We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey folks,
I have been using this for a long time (years), and out of nowhere I started having the following issue in production only:
Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
My temporary solution was adding a custom CORS middleware with the following config.
res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader( "Access-Control-Allow-Methods", "POST,GET,OPTIONS,PUT,DELETE" ); res.setHeader( "Access-Control-Allow-Headers", "Content-Type,Accept,Authorization" ); next();
I hope they investigate the issue, since this lib is awesome and saved me ton of hours of CORS related headache
PS:
I was using it like I always did, with a:
app.use(cors());
I've tried to edit allowedHeaders with the options that I used above, also also tried
app.options("*", cors());
But nothing seemed to make any difference at all.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey folks,
I have been using this for a long time (years), and out of nowhere I started having the following issue in production only:
My temporary solution was adding a custom CORS middleware with the following config.
I hope they investigate the issue, since this lib is awesome and saved me ton of hours of CORS related headache
PS:
I was using it like I always did, with a:
I've tried to edit allowedHeaders with the options that I used above, also also tried
But nothing seemed to make any difference at all.
The text was updated successfully, but these errors were encountered: