Skip to content
Fastify plugin to remove the X-Powered-By header
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks
src
test
.coveralls.yml
.editorconfig
.eslintrc.yml
.gitignore
.prettierrc.yml
.travis.yml
LICENSE
README.md
ava.config.js
package-lock.json
package.json

README.md

fastify-hide-powered-by

Build Status Code coverage Code style Dependency Status Dev Dependency Status NPM version NPM downloads NPM license

Fastify plugin to remove the X-Powered-By header

Why?

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. :)

Difference

This plugin has passed all hide-powered-by test cases. And no difference in options.

Install

Via npm:

npm i fastify-hide-powered-by

Via yarn:

yarn add fastify-hide-powered-by

Usage

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;
});

Options

This plugin has the same options as the middleware in helmet.

setTo {string|undefined}

Default is undefined which means remove X-Powered-By header. You could pass a string in to set X-Powered-By to that.

Changelog

  • 0.3.0
    • Update test case
  • 0.2.0
    • Add test case
    • Add code coverage
    • Add benchmarks
  • 0.1.0:
    • Init version
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.