Skip to content

Instantly share code, notes, and snippets.

@zapaiamarce
Created March 30, 2020 15:53
Show Gist options
  • Save zapaiamarce/2703621a3dadd1fe074bee565bc33c01 to your computer and use it in GitHub Desktop.
Save zapaiamarce/2703621a3dadd1fe074bee565bc33c01 to your computer and use it in GitHub Desktop.
Zeit Now Serverless CORS Example
{
"routes": [
{
"src": "/api/(.*)",
"headers": {
"access-control-allow-credentials":"true",
"access-control-allow-origin": "*"
},
"continue": true
},
{
"src": "/api/(.*)",
"methods": ["OPTIONS"],
"headers": {
"access-control-allow-headers":"X-Requested-With,Access-Control-Allow-Origin,X-HTTP-Method-Override,Content-Type,Authorization,Accept",
"access-control-allow-methods": "POST,GET,PUT,PATCH,DELETE,OPTIONS"
},
"status": 200,
"continue": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment