Created
May 4, 2020 19:15
-
-
Save sackeyjason/cf80b58374e9a6e9e5f597c616c3eab7 to your computer and use it in GitHub Desktop.
CORS solution
This file contains 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
exports.handler = async function http(req) { | |
return { | |
body: '{ "ok": true }', | |
headers: { | |
"Access-Control-Allow-Origin": "*", | |
"Access-Control-Allow-Methods": "GET, POST, OPTIONS", | |
"Access-Control-Allow-Headers": | |
req.headers["access-control-request-headers"], | |
}, | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment