Created
March 30, 2020 15:53
-
-
Save zapaiamarce/2703621a3dadd1fe074bee565bc33c01 to your computer and use it in GitHub Desktop.
Zeit Now Serverless CORS Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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