Helmet challenges

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:

These tests are fiddly and sometimes work intermittently, depending on the network and hosting at both ends, etc. There being no errors in the console and your code being almost identical to mine that passed previously, I retried the test and it passed.

So, test it twice if it fails the first time.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.