Skip to content

Instantly share code, notes, and snippets.

@joseywoermann
Created July 5, 2021 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joseywoermann/3147662d943d6bc3520a23527a2e492d to your computer and use it in GitHub Desktop.
Save joseywoermann/3147662d943d6bc3520a23527a2e492d to your computer and use it in GitHub Desktop.
make CORS error go poof on Vercel
{
"headers": [
{
"source": "/api/(.*)",
"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" }
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment