koa-expect-ct

A koajs middleware to add Expect-CT header

MIT License

Downloads
7
Stars
0
Committers
1

koa-expect-ct

A koajs middleware for expect-ct header

Table of Contents

Install

npm:

npm install koa-expect-ct

yarn:

yarn add koa-expect-ct

Usage

const expectCT = require('koa-expect-ct');

const app = new Koa();

const options = {
  maxAge: 60,
  enforce: true,
  reportUri: 'https://reports.com'
};

// add expectCT middleware
app.use(expectCT(options));
app.use(function (ctx) {
  ctx.body = { foo: 'bar' };
});

Contributors

Name Website
Shaun Warman https://shaunwarman.com

License

MIT © Shaun Warman