Secure Real Time Multiplayer Game - Failed 4 last test cases

Tell us what’s happening:
I saw all headers are corrected on my solution links but 4 final tests were failed.

Result from brower’s network is correct for all requests as below

Screenshot from 2021-03-23 22-21-54

This is my code

// server.js
const helmet = require("helmet");
const nocache = require("nocache");

    noSniff: true,
    xssFilter: true,
    hidePoweredBy: {
      setTo: "PHP 7.4.3",



Screenshot from 2021-03-23 22-40-30

I found the FCC’s test cases here. I tried to copy and run them on local and I passed all but still failed 4 tests when I submitted.

What is my error? Any hint to fix it?

Your project link(s)

githubLink: GitHub - japananh/boilerplate-project-secure-real-time-multiplayer-game: A boilerplate for a freeCodeCamp project.

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36.

Challenge: Secure Real Time Multiplayer Game

Link to the challenge:


I found an error when submitted due to cors at API

Screenshot from 2021-03-23 23-27-21

At the line below solved the problem

// server.js
app.use(cors({origin: '*'})); //For FCC testing purposes only

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