I want to remove X-Powered-By for Security,Save Bandwidth in ExpressJS(node.js). how to do it?
it could be filter(app.use) ?
app.use(function(req,res,next_cb){ /* remove X-Powered-By header */ next_cb(); }
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The better way to do it is:
You can also make a middleware to remove any header like so:
See more info on how to remove a header:
http://nodejs.org/api/http.html#http_response_removeheader_name