Last active
March 12, 2021 17:01
-
-
Save thanakijwanavit/1a16db5a8a40c9020be0ec268cc0d81c to your computer and use it in GitHub Desktop.
apiGateway Cors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Resources: | |
| Api: | |
| Type: AWS::Serverless::Api | |
| Properties: | |
| StageName: Prod | |
| Cors: | |
| AllowHeaders: "'*'" | |
| AllowMethods: "'*'" | |
| AllowOrigin: "'*'" | |
| EndpointConfiguration: | |
| Type: EDGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: 2010-09-09 | |
| Resources: | |
| CloudFrontCachePolicy: | |
| Type: AWS::CloudFront::CachePolicy | |
| Properties: | |
| CachePolicyConfig: | |
| CachePolicyConfig | |
| cloudfrontdistribution: | |
| Type: AWS::CloudFront::Distribution | |
| Properties: | |
| Restrictions: | |
| GeoRestriction: | |
| RestrictionType: whitelist | |
| Locations: | |
| - TH | |
| - SG | |
| - US | |
| - UK | |
| DistributionConfig: | |
| CacheBehaviors: | |
| - LambdaFunctionAssociations: | |
| - EventType: string-value | |
| LambdaFunctionARN: string-value | |
| OriginCustomHeaders: | |
| - HeaderName: Access-Control-Allow-Origin | |
| HeaderValue: * | |
| - HeaderName: Access-Control-Allow-Methods | |
| HeaderValue: * | |
| - HeaderName: Access-Control-Allow-Headers | |
| HeaderValue: * | |
| Origins: | |
| - DomainName: !Sub "${OrismaSearchApi}.execute-api.${AWS::Region}.amazonaws.com" | |
| OriginPath: "/Prod/orismaSearch" | |
| Id: orismasearchorigin | |
| ConnectionTimeout: 5 | |
| OriginCustomHeaders: | |
| - HeaderName: Access-Control-Allow-Origin | |
| HeaderValue: "*" | |
| - HeaderName: Access-Control-Allow-Methods | |
| HeaderValue: "*" | |
| - HeaderName: Access-Control-Allow-Headers | |
| HeaderValue: "*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment