@cryptotaxi247 / infra / commits / f010edb8

terraform : enable segment caching for ISO releases

zimbatm committed Mar 19, 2022 at 12:06 UTC f010edb84072eeef06e82cb5de0c8cda0e0bf889
1 file changed +14
terraform/releases.tf
+14
@@ -174,6 +174,20 @@ resource "fastly_service_v1" "releases" {
174 type = "recv"
175 }
176
177 + # Work around the 2GB size limit for large files
178 + #
179 + # See https://docs.fastly.com/en/guides/segmented-caching
180 + snippet {
181 + content = <<-EOT
182 + if (req.url.path ~ "^/nixos/") {
183 + set req.enable_segmented_caching = true;
184 + }
185 + EOT
186 + name = "Enable segment caching for ISOs and friends"
187 + priority = 60
188 + type = "recv"
189 + }
190 +
191 snippet {
192 content = <<-EOT
193 if (beresp.status == 403) {