Tell us what’s happening:
I could execute the first challenge of this course but I am unable to get the second challenge, " Hide Potentially Dangerous Information Using helmet.hidePoweredBy()" to run in the FCC test module.
Have searched FCC forums, GitHub and other resources without a working solution.
Your code so far
Challenge #1
package.json:
“dependencies”: {
“express”: “^4.14.0”,
“helmet”: “3.21.3”
},
myApp.js
var helmet = require(‘helmet’);
Challenge #2 code:
app.use(helmet.hidePoweredBy({ setTo: ‘PHP 4.2.0’ }));
The output of the FCC test page is as follows:
// running tests helmet.hidePoweredBy() middleware should be mounted correctly // tests completed
helmet.hidePoweredBy() middleware should be mounted correctly
Text appears to match. I don’t know what the test assertion failure is.
One thing I observed when running myApp.js in repl.it is it takes 48-57 secs for the output screen to appear. I don’t see any errors when running challenges #1, 2 but don’t know if there is a time-out issue.
I am pasting the following URL from repl.it into the FCC tester: https://repl.it/@Grayman1/boilerplate-infosec#myApp.js
Assume that this is the correct link.
Any recommendations appreciated.
Thank you.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
.
Challenge: Hide Potentially Dangerous Information Using helmet.hidePoweredBy()
Link to the challenge: