Information Security with HelmetJS, test case not passing

Tell us what’s happening:
helmet.frameguard() middleware should be mounted correctly
This test is not passing!!
Your code so far

var helmet = require('helmet');
app.use(helmet.hidePoweredBy({ setTo: 'PHP 4.2.0' }));
app.use(helmet.frameguard({action: 'deny'}));

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36.

Challenge: Mitigate the Risk of Clickjacking with helmet.frameguard()

Link to the challenge:

am having the same issue, did you find a remedy?

No, I was not sure, if the issue was with my code or the testing in FCC.

1 Like

To pass the test install the “frameguard” package , require it on myApp.js and write the middleware like this.

const frameguard = require('frameguard');
app.use(frameguard({ action: 'deny' })); 

This worked for me !!