0.0.1 • Published 4 years ago
koa-expect-ct v0.0.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 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
Name | Website |
---|---|
Shaun Warman | https://shaunwarman.com |
License
0.0.1
4 years ago