dwyl / learn-aws-lambda

✨ Learn how to use AWS Lambda to easily create infinitely scalable web services
1.05k stars 202 forks source link

How to *programatically* enable CORS for your API Gateway API? #77

Open nelsonic opened 8 years ago

nelsonic commented 8 years ago

Enabling CORS via the Web UI is easy: http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html what we need is a way to do it using the aws-sdk so that we can deploy our API with a single command.

chisNaN commented 7 years ago

Once you have "enabled cors" don't forget to THEN click on "deploy API" again (otherwise it won't work) But sorry not to reply the initial question(((