Skip to content

Commit 161f5c9

Browse files
chore: test deployment
1 parent 73f6131 commit 161f5c9

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

infrastructure/api/api-gateway.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ resource "aws_apigatewayv2_api" "app" {
2323
for_each = var.enable_cors ? [1] : []
2424

2525
content {
26-
allow_origins = ["https://${data.terraform_remote_state.frontend.outputs.cloudfront.domain_name}", "https://sitesandtrailsbc.ca", "beta.sitesandtrailsbc.ca"]
26+
allow_origins = [
27+
"https://${data.terraform_remote_state.frontend.outputs.cloudfront.domain_name}",
28+
"https://sitesandtrailsbc.ca",
29+
"https://beta.sitesandtrailsbc.ca"
30+
]
2731
allow_methods = var.cors_allowed_methods
2832
allow_headers = var.cors_allowed_headers
2933
allow_credentials = var.cors_allow_credentials

infrastructure/api/vars.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ variable "cors_allowed_methods" {
195195
variable "cors_allowed_headers" {
196196
description = "Allowed headers for CORS configuration"
197197
type = list(string)
198-
default = ["Authorization", "Content-Type", "Accept"]
198+
default = ["Authorization", "Content-Type", "Accept", "Origin"]
199199
}
200200

201201
variable "cors_allow_credentials" {

infrastructure/api/waf.tf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,7 @@ resource "aws_cloudfront_distribution" "api" {
6969
min_ttl = 0
7070
max_ttl = 900
7171

72-
forwarded_values {
73-
query_string = true
74-
75-
cookies {
76-
forward = "all"
77-
}
78-
}
72+
origin_request_policy_id = "216adef6-5c7f-47e4-b989-5492eafa07d3" # Managed-AllViewerExceptHostHeader
7973
}
8074

8175
restrictions {

0 commit comments

Comments
 (0)