Skip to content

Instantly share code, notes, and snippets.

@dbalduini
Last active July 25, 2016 14:52
Show Gist options
  • Save dbalduini/da9eef9247f4b01334851531bb0ed507 to your computer and use it in GitHub Desktop.
Save dbalduini/da9eef9247f4b01334851531bb0ed507 to your computer and use it in GitHub Desktop.
Test web site for Content Nniffing security vulnerability
Router.route('/sniff', function() {
var response = this.response;
response.writeHead(200, {
'Content-Type' : 'text/plain',
'X-Content-Type-Options' : 'nosniff' // comment me to redirect the browser
});
response.end('<meta http-equiv="refresh" content="0; url=http://example.com/" />');
}, {
where : 'server'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment