Skip to content

Commit

Permalink
fix: TLS, cors
Browse files Browse the repository at this point in the history
  • Loading branch information
timbru31 committed Dec 17, 2024
1 parent f82dd3c commit 893acbe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,15 @@ resources:
ViewerProtocolPolicy: redirect-to-https
ForwardedValues:
QueryString: true
ResponseHeadersPolicyId: e61eb60c-9c35-4d20-a928-2b84e02af89c
Aliases:
- ${env:FRONTEND_URL_WITHOUT_HTTPS}
ViewerCertificate:
Fn::If:
- IsProductionOrStaging
- AcmCertificateArn: ${self:provider.environment.FRONTEND_CERTIFICATE_ARN}
SslSupportMethod: sni-only
MinimumProtocolVersion: TLSv1.2_2018
MinimumProtocolVersion: TLSv1.2_2021
- Ref: AWS::NoValue

BackendDistribution:
Expand All @@ -435,7 +436,7 @@ resources:
HTTPSPort: 443
OriginProtocolPolicy: https-only
OriginSSLProtocols:
- TLSv1
- TLSv1.2
HttpVersion: http2
DefaultCacheBehavior:
AllowedMethods:
Expand All @@ -450,14 +451,15 @@ resources:
ViewerProtocolPolicy: redirect-to-https
ForwardedValues:
QueryString: true
ResponseHeadersPolicyId: e61eb60c-9c35-4d20-a928-2b84e02af89c
Aliases:
- ${env:BACKEND_URL_WITHOUT_HTTPS}
ViewerCertificate:
Fn::If:
- IsProductionOrStaging
- AcmCertificateArn: ${self:provider.environment.BACKEND_CERTIFICATE_ARN}
SslSupportMethod: sni-only
MinimumProtocolVersion: TLSv1.2_2018
MinimumProtocolVersion: TLSv1.2_2021
- Ref: AWS::NoValue

FrontendAliasRecord:
Expand Down

0 comments on commit 893acbe

Please sign in to comment.