Hi, I need help to solve this problem of CORS settings?Thx

Question:
My code was forked and deployed by someone else. They raised a CORS error with me.
Current behavior:
My CORS setting work fail after deploy on replit.
Desired behavior
My CORS setting work good.
Repl link:

app.use((req, res, next) => {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Methods", "POST");
  res.header("Access-Control-Allow-Headers", "Content-Type");
  res.header("Access-Control-Allow-Credentials", true);
  next();
});

Hello @mutuyihao and welcome to the community!

Could you please share the link to your repl?

Also, provide the full error message to us.