Fastify plugin to remove the X-Powered-By header
You may know hide-powered-by as a hide-powered-by 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 hide-powered-by test cases. And no difference in options.
Via npm:
npm i fastify-hide-powered-by
Via yarn:
yarn add fastify-hide-powered-by
const fastify = require('fastify');
const fastifyHidePoweredBy = require('fastify-hide-powered-by');
const app = fastify();
app.register(fastifyHidePoweredBy);
app.listen(3000, err => {
if (err) throw err;
});
This plugin has the same options as the middleware in helmet.
Default is undefined
which means remove X-Powered-By
header. You could pass a string in to set X-Powered-By
to that.
- 0.3.0
- Update test case
- 0.2.0
- Add test case
- Add code coverage
- Add benchmarks
- 0.1.0:
- Init version