Fastify plugin to set the Expect-CT header
You may know expect-ct as a expect-ct middleware used in helmet. And you could use it as a middleware in fastify also. So why i made this plugin?
You may find the reason in benchmark result and wish you like it. :)
This plugin has passed all expect-ct test cases. And no difference in options.
Via npm:
npm i fastify-expect-ct
Via yarn:
yarn add fastify-expect-ct
const fastify = require('fastify');
const fastifyExpectCt = require('fastify-expect-ct');
const app = fastify();
app.register(fastifyExpectCt, {
// Your options
});
app.listen(3000, err => {
if (err) throw err;
});
This plugin has the same options as the middleware in helmet.
Set max-age
in header. Default is 0
. Plugin will use default value if you passed in a non-numeric value.
Set enforce
value in header. Default is false
.
Set reportUri
value in header. Default is empty.
- 0.3.0
- Use expect-ct test cases
- 0.2.0
- Add test case
- Add code coverage
- Add benchmarks
- 0.1.0:
- Init version