Cors issue with react app #5147
Locked
Shoxrux2107
started this conversation in
Show & Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on deploying a react.js frontend to Vercel. It's connected to a Spring Boot backend, which is already deployed on Vercel successfully.
I have read the article: how-to-enable-cors I followed the instruction to create the versel.json. This is its content:
{
"headers": [
{
"source": "/(.)",
"headers": [
{ "key": "Access-Control-Allow-Credentials", "value": "true" },
{ "key": "Access-Control-Allow-Origin", "value": "" },
{ "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS,PATCH,DELETE,POST,PUT" },
{ "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }
]
}
]
}
But it doesnt work.
Please help to solve this problem.
Beta Was this translation helpful? Give feedback.
All reactions