Skip to content

Commit

Permalink
Merge pull request #416 from jdno/rustup-surrogate-key
Browse files Browse the repository at this point in the history
Tag rustup artifacts with surrogate key
  • Loading branch information
jdno authored Aug 14, 2024
2 parents 8465b62 + 384dcc9 commit 25a07ab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions terragrunt/modules/release-distribution/fastly-static.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,21 @@ resource "fastly_service_vcl" "static" {
VCL
}

# When a new version of rustup is released, the release script invalidates
# the CloudFront cache for `/rustup/*` and any object that is tagged with
# the `rustup` key on Fastly.
# See https://github.com/rust-lang/rustup/blob/master/ci/sync-dist.py for
# details.
snippet {
name = "set cache key for rustup"
type = "fetch"
content = <<-VCL
if (req.url ~ "^\/rustup\/") {
set beresp.http.Surrogate-Key = "rustup";
}
VCL
}

snippet {
name = "redirect rustup.sh to rustup.rs"
type = "error"
Expand Down

0 comments on commit 25a07ab

Please sign in to comment.