This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
response-powered-by with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
This middleware sets or removes the X-Powered-By header on HTTP responses served by Express framework.
X-Powered-By key header specifies the technology supporting a web application. This header is used to gather metrics about the web.
If you want use response-powered-by you have to install it. There are two methods for that: In your package.json add the following item:
"response-powered-by": "*" for the latest version "response-powered-by": "1.0.0" for the version 1.0.0
launch this command:
npm install response-powered-by --save
var responsePoweredBy = require('response-powered-by'); //Import some other required modules var express = require('express'); var app = express(); //Some other configuration for the express app app.use(responsePoweredBy("Your cutom string for X-Powered-By header"));
This middleware sets the X-Powered-By header to a value passed in input, but if that value is not a string or it's undefined or null this header will be removed from the response.