Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
CORS error when calling function in browser #4037
I have been digging for many hours on the internet, reading all the issue comments and try the solution at :
I am using fetch API in frontend with the following headers :
even if I add
my serverless.yml has the following config:
my hander callback response:
also, I used postman to test it, it returns
Is this related to aws apiGateway issues or serverless config issues?
However, when I try to call the function from browser and postman as I mentioned above.
Finally, if your Lambda fails for some reason (timeout, error, etc) then the response is the one generated by the API Gateway which will also lack the CORS headers.