Replies: 3 comments
-
Can you try to set |
Beta Was this translation helpful? Give feedback.
-
I will have to deploy the API to a new region when I get a chance; the manual changes I made aren't being modified so it would be hard for me to check if this does resolve the issue. |
Beta Was this translation helpful? Give feedback.
-
Alright, in deploying the API to a new region I'm seeing another issue that I might have issues with. It's possible this has a way to fix this but I don't know what it would be after looking at the documentation. The issue now is that when the API Gateway is being created, the Any advice? |
Beta Was this translation helpful? Give feedback.
-
Description:
When using CORS with a Cognito Authorizer the generated OPTIONS requests also require cognito authorization. This was throwing errors when attempting to call the API endpoint from the browser as the authorization header is not passed along.
E.G. here is the pre-flight request made to the API Gateway endpoint.
Note: there is not an "authorization" header present.
Steps to reproduce:
Resources
sectionObserved result:
The mock method created for the OPTIONS request requires cognito authorization, which breaks the ability to call the API from any browser* (tested with Edge, Chrome, and Firefox).
Expected result:
Even if there is an authorizer present, OPTIONS requests should likely not have it added as it is likely to break browser functionality.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.27.2Add --debug flag to any SAM CLI commands you are running
Beta Was this translation helpful? Give feedback.
All reactions