Skip to content

Commit

Permalink
Merge pull request #112 from alphagov/mobile-backend-fixup
Browse files Browse the repository at this point in the history
fixup mobile backend int service to point at s3 correctly
  • Loading branch information
theseanything authored Sep 9, 2024
2 parents 5330ac8 + acfaa5d commit d697a35
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions mobile-backend/service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ locals {
"x-amz-server-side-encryption"
]
# headers to add
ttl = "300s" # 5 minutes
cache_control = "max-age=300, public, immutable"
cache_control = "max-age=300, public, immutable" # 5 minutes
access_control_allow_origin = "*"
}

Expand All @@ -25,15 +24,17 @@ resource "fastly_service_vcl" "mobile_backend_service" {
}

backend {
name = "Mobile backend config bucket - ${var.environment}"
address = local.origin_hostname
port = 443
name = "Mobile backend config bucket - ${var.environment}"
address = local.origin_hostname
override_host = local.origin_hostname
port = 443

connect_timeout = 1000
first_byte_timeout = 15000
max_conn = 200
between_bytes_timeout = 10000

use_ssl = true
ssl_check_cert = true
ssl_ciphers = "ECDHE-RSA-AES256-GCM-SHA384"
ssl_cert_hostname = local.origin_hostname
Expand All @@ -51,14 +52,6 @@ resource "fastly_service_vcl" "mobile_backend_service" {
}
}

header {
destination = "ttl"
name = "Add ttl header"
action = "set"
type = "response"
source = "\"${local.ttl}\""
}

header {
destination = "http.Cache-Control"
name = "Add Cache-Control header"
Expand Down

0 comments on commit d697a35

Please sign in to comment.