Skip to content

Update VLC guard against caching stale content at edge #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions terraform/warehouse/vcl/main.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ sub vcl_recv {
# Require authentication for curl -XPURGE requests.
set req.http.Fastly-Purge-Requires-Auth = "1";

# I'm not 100% sure on what this is exactly for, it was taken from the
# Fastly documentation, however, what I *believe* it does is just ensure
# that we don't serve a stale copy of the page from the shield node when
# an edge node is requesting content.
if (req.http.Fastly-FF) {
# Prevent edge from caching stale content served from shield
# https://developer.fastly.com/learning/concepts/stale/#shielding-considerations
if (fastly.ff.visits_this_service > 0) {
set req.max_stale_while_revalidate = 0s;
}

Expand Down