Skip to content

Commit

Permalink
Fix CloudFront distribution to allow POST method - otherwise calls to…
Browse files Browse the repository at this point in the history
… metrics POST API from Azure will fail
  • Loading branch information
Learnspree committed Apr 14, 2020
1 parent cf8e94c commit 63c229b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spf-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@ resources:
MinimumProtocolVersion: TLSv1.2_2018
SslSupportMethod: sni-only
DefaultCacheBehavior:
# must allow all methods in order to allow posts from Azure to SPF API via cloudfront distribution URL
AllowedMethods:
- DELETE
- GET
- HEAD
- OPTIONS
- PATCH
- POST
- PUT
TargetOriginId: OriginSPFAPI${self:provider.stage}
ViewerProtocolPolicy: 'redirect-to-https'
DefaultTTL: 31536000
Expand Down

0 comments on commit 63c229b

Please sign in to comment.