serverless-patterns icon indicating copy to clipboard operation
serverless-patterns copied to clipboard

Add allowHeaders?

Open asunar opened this issue 5 years ago • 3 comments

Do we need to add allow headers to api.yaml similar to here to avoid CORS errors?

Details: https://forums.aws.amazon.com/thread.jspa?threadID=337219&tstart=0

asunar avatar Mar 31 '21 18:03 asunar

Hi! Which pattern are you referring to?

jbesw avatar Mar 31 '21 19:03 jbesw

Sorry, apigw-sfn

asunar avatar Mar 31 '21 19:03 asunar

Hi Asunar. If you wanted to call the service from a web browser then yes thank should help to avoid CORS errors: you could also add some configuration to the SAM template similar to this example: https://github.com/aws-samples/happy-path/blob/master/backend/template.yaml

benjasl-stripe avatar Apr 01 '21 12:04 benjasl-stripe