Hide Potentially Dangerous Information Using helmet.hidePoweredBy()

Hi!

I’m trying to end the Information Security with HelmetJS - Hide Potentially Dangerous Information Using helmet.hidePoweredBy() challange but I’m stuck.
I have to configure helmet to : app.use(helmet.hidePoweredBy());

So in my code:

var helmet = require('helmet');
app.use(helmet.hidePoweredBy());

When I run the test:

expected [] to include ‘hidePoweredBy’

What’s wrong??

Thanks you.

Any chances to see your glitch project?

Of course!

Thanks you.

Everything seems to be alright. Reload the challenge page and paste it again.

I’m assuming you’re using the correct URL (https://snapdragon-reason.glitch.me), right?

1 Like

Yes, Tried agains but same issue.

I came here with the same problem.

For some reason just waiting 5 mins or so and then submitting again works.

Maybe there is caching on the server that takes a few minutes to update the headers?

1 Like

Hi mattszcz, I tried it waiting 5 min, 1 day,2…from other pc…and nothins works :S
I only notice the message change:
// running test
expected ‘Express’ to not equal ‘Express’
// tests completed

Hi, finally solve by using another browser (firefox).

Thanks you!

1 Like

Just for anyone else coming here, it looks like the info is cached. I did a simple update on the html, and then it completed the challenge without a problem.

2 Likes

Hello,
I added this line to the index.html page:

 <meta http-equiv="expires" content="0">

But I still get the error “expected ‘Express’ to not equal ‘Express’”
Could you please guide?
Thank you

Hello.

For anyone facing the same issue, the code provided above is correct:

var helmet = require(‘helmet’);
app.use(helmet.hidePoweredBy());

You just need to reload page with challange omitting cache before pasting the link to your Glitch project

  • Ctrl + R for windows
  • Ctrl+Shift+R for Mac
5 Likes

Reloading the curriculum quiz page and submitting the Glitch URL (after having updtaed the code there) again did it for me.
Thanks.

1 Like