You probably want to use app.use with your own middleware:
app.use(function(req, res, next) {
res.header('X-XSS-Protection', 0);
next();
});
More Related Contents:
- Error: request entity too large
- Calling Express Route internally from inside NodeJS
- Difference between res.send and res.json in Express.js
- Writing to files in Node.js
- How to access the request body when POSTing using Node.js and Express?
- How to enable cors nodejs with express?
- How to get a URL parameter in Express?
- Failed to load c++ bson extension
- Function to convert timestamp to human date in javascript [duplicate]
- Rest with Express.js nested router
- What is NODE_ENV and how to use it in Express?
- Nodejs express and promises not doing what I expect
- How can I set response header on express.js assets
- UnhandledPromiseRejectionWarning: MongooseServerSelectionError
- What does “./bin/www” do in Express 4.x?
- Express js form data
- Why is PassportJS in Node not removing session on logout
- MongoDB select where in array of _id?
- res.download() not working in my case
- Accessing EJS variable in Javascript logic
- Listen on HTTP and HTTPS for a single express app
- Accessing Express.js local variables in client side JavaScript
- Node.js request CERT_HAS_EXPIRED
- Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent
- configure node express to serve static bower_components?
- require(‘babel/register’) doesn’t work
- Express: Setting content-type based on path/file?
- express.js – how to intercept response.send() / response.json()
- How to handle ETIMEDOUT error?
- Can’t get rid of header X-Powered-By:Express