serverless/serverless
API gateway: Ensure CORS headers for non 200 status codes
Aperta
#3896 aperta il 5 lug 2017
cat/aws-event-api-gatewayenhancementhelp wantedneeds feedback
Metriche repository
- Star
- (46.915 stelle)
- Metriche merge PR
- (Merge medio 1g 15h) (34 PR mergiate in 30 g)
Descrizione
This is a Question/Feature Proposal
Description
- I am not sure if this is possible with serverless, but I couldn't find anything in the docs. When using Cognito authorises with serverless, when identity token becomes invalid, the response from the api gateway is 401(unauthorised), but there is no way to set cors headers on that response. While using AWS Console this can be done via "Gateway Responses" (see image below) tab.

Additional Data
- Serverless Framework Version you're using: 1.16.1
- Operating System: ubuntu 16.04