I've created a few Lambda functions that get triggered by API-Gateway events.
Now I want to enable CORS for these endpoints, but it doesn't seem to work. In the last few versions of AWS SAM the CORS functionality was added or updated, but I still can't get it to work.
This is what I tried:
Gobals:
Api:
Cors: "'*'"
You forgot to add the AllowOrigin
property.
It needs to look like this:
Globals:
Api:
Cors:
AllowOrigin: "'*'"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With