0.0.1 • Published 4 years ago

koa-expect-ct v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

koa-expect-ct

build status code coverage code style styled with prettier made with lass license npm downloads

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 options = {
  maxAge: 60,
  enforce: true,
  reportUri: 'https://reports.com'
};

const app = new Koa();

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

Contributors

NameWebsite
Shaun Warmanhttps://shaunwarman.com

License

MIT © Shaun Warman