Tell us what’s happening:
Like some other users, I am having trouble with the initial helmet.hidePoweredBy() question. I am using Repl.it. I have noticed a few things. 1) Clearing my cache isn’t working (is it a server issue?). 2) I have waited days between submitting the answer. 3) My starting code is not the same as others I see in posts (i.e. no initial comments in the code line from FCC). I did not delete or change anything. Can I start the module over from scratch? 5) Maybe my code is wrong? I have tried so many different ways. it is hard to tell because they all give the same answer, “helmet.hidePoweredBy() middleware should be mounted correctly” 6) FCC states you can add a fake x-powered-by header, which, according to helmet is not possible:
“This middleware takes no options.
If you’re using Express, this middleware will work, but you should use app.disable(“x-powered-by”) instead.”
Your code so far
var express = require(‘express’); // Do Not Edit
var app = express(); // Do Not Edit
var helmet = require(‘helmet’);
Your browser information:
User Agent is:
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0.
Challenge: Hide Potentially Dangerous Information Using helmet.hidePoweredBy()
Link to the challenge: