Task #2
myApp.js:
var express = require('express');
var helmet = require('helmet');
var app = express();
app.use(helmet.hidePoweredBy()); // hide "X-Powered-By: Express"
Test fails:
// running tests
helmet.hidePoweredBy() middleware should be mounted correctly
// tests completed
repl.it: https://fcc-infosec.aswonder53.repl.co
git: https://github.com/LLPeterX/fcc-infosec.git
I have checked that response headers do not contain “X-Powered-By”
Also I have warning on repl.it: (node:409) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36.
Challenge: Hide Potentially Dangerous Information Using helmet.hidePoweredBy()
Link to the challenge: