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(); }
Don't remove it; ask Express not to generate it in the first place:
https://stackoverflow.com/a/12484642/506073
Go to your app.js
and just after:
var app = express();
Add:
app.disable('x-powered-by');