Skip to content

Instantly share code, notes, and snippets.

@deepal
Created February 17, 2016 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save deepal/979a5566f1b686773db8 to your computer and use it in GitHub Desktop.
Save deepal/979a5566f1b686773db8 to your computer and use it in GitHub Desktop.
nodesec-helmet
var helmet = require('helmet');
app.use(helmet.hidePoweredBy({setTo: 'DummyServer 1.0'})); //change value of X-Powered-By header to given value
app.use(helmet.noCache({noEtag: true})); //set Cache-Control header
app.use(helmet.noSniff()); // set X-Content-Type-Options header
app.use(helmet.frameguard()); // set X-Frame-Options header
app.use(helmet.xssFilter()); // set X-XSS-Protection header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment