Skip to content

Commit

Permalink
feat: update cors definitions for httpApi in yaml template
Browse files Browse the repository at this point in the history
see: redwoodjs#3755 (comment)
Co-authored-by: Kurt Hutten <[email protected]>
  • Loading branch information
virtuoushub and Irev-Dev committed Dec 9, 2021
1 parent 779692a commit b62f50c
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,18 @@ provider:
runtime: nodejs14.x
region: us-east-2 # This is the AWS region where the service will be deployed.
httpApi: # HTTP API is used by default. To learn about the available options in API Gateway, see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html
cors: true
cors:
allowOrigins:
- '*' # This is the default value. You can remove this line if you want to restrict the CORS to a specific origin.
allowCredentials: true
allowedHeaders:
- authorization
- auth-provider
- content-Type
- X-Amz-Date
- X-Api-Key
- X-Amz-Security-Token
- X-Amz-User-Agent
payload: '1.0'
useProviderTags: true # https://www.serverless.com/framework/docs/deprecations/#AWS_HTTP_API_USE_PROVIDER_TAGS
stackTags: # Add CloudFormation stack tags here
Expand Down

0 comments on commit b62f50c

Please sign in to comment.