Repl.co refused to connect

I need help!
I am having trouble submitting my code, I am a beginner to replit. I finished the first two challenges successfully in the InfoSec helmetJS course, I got the the third, run the code and submitted it, it keeps saying “helmet.frameguard() middleware should be mounted correctly” on the replit part my code runs fine it even says “Your app is listening on port 3000” but there is that sad face with repl refused to connect under, I don’t know if the error is from replit or freecodecamp but I am sure my code is fine, even checked the solution.

my line is: “app.use(helmet.frameguard({action: ‘deny’}));”

Project link:

solution: https://replit.com/@charbelawad/boilerplate-infosec-3

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36

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

Link to the challenge:

1 Like

It should work if you open it in a new tab. It’s the icon next to the pencil icon at the top of the preview window. The default preview view is inside an iframe.

As for the test failing, you have to install 3.21.3. The version of helmet in package.json should not have a caret ^ in front of it.

"dependencies": {
	"express": "^4.14.0",
	"helmet": "3.21.3"
},

If you remove the caret ^ and re-run it should update the package and you should pass the test.

2 Likes

THANK YOUUUU!
Sorry I got exited I am completely new to replit and JS in general I thought my code was fine and the damn thing was just not working, I lost hope and got back to hardware stuff but know I’m back in. Big THANKS!

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