Socket
Book a DemoInstallSign in
Socket

response-powered-by

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

response-powered-by

Middleware to set the X-Powered-By header returned by Express

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
13
-40.91%
Maintainers
2
Weekly downloads
 
Created
Source

response-powered-by

Middleware to set or remove the X-Powered-By header returned by Express

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.

Installation

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": "version"

then digit

npm install

Example:

"response-powered-by": "*" for the latest version
"response-powered-by": "1.0.0" for the version 1.0.0

OR

launch this command:

npm install response-powered-by --save

Use

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.

Keywords

express

FAQs

Package last updated on 21 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts