Skip to content

Commit

Permalink
Fix value for allowed methods
Browse files Browse the repository at this point in the history
AWS only allows three different sets of methods as values for the
`allowed_methods` field. Adding the `POST` method requires to also allow
the other methods.
  • Loading branch information
jdno committed Jul 17, 2024
1 parent 38d367f commit ce143ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/docs-rs/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ resource "aws_cloudfront_distribution" "webapp" {

default_cache_behavior {
target_origin_id = "ec2"
allowed_methods = ["GET", "HEAD", "OPTIONS", "POST"]
allowed_methods = ["GET", "HEAD", "OPTIONS", "DELETE", "PATCH", "POST", "PUT"]
cached_methods = ["GET", "HEAD", "OPTIONS"]
compress = true
viewer_protocol_policy = "redirect-to-https"
Expand Down

0 comments on commit ce143ba

Please sign in to comment.