awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.05k stars 197 forks source link

Enabling CORS #24

Closed srikanthkumar closed 5 years ago

srikanthkumar commented 5 years ago

How may I enable CORS for this setup? Please help

sapessi commented 5 years ago

You can use API Gateway to set up CORS for you APIs. This way the pre-flight requests (OPTION) don't even need to trigger your Lambda. Docs here

srikanthkumar commented 5 years ago

Thanks Sapessi, It worked.