Skip to content

Commit

Permalink
Merge pull request #30 from alphagov/remove-deprecated-header
Browse files Browse the repository at this point in the history
Remove deprecated use of Fastly-Cachetype header
  • Loading branch information
deborahchua authored Dec 4, 2023
2 parents bfea866 + d3e8419 commit 9ca6982
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions modules/assets/assets.vcl.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ sub vcl_fetch {
}

if (beresp.http.Cache-Control ~ "private") {
set req.http.Fastly-Cachetype = "PRIVATE";
return (pass);
}

Expand All @@ -288,7 +287,6 @@ sub vcl_fetch {
}

if (beresp.status >= 500 && beresp.status <= 599) {
set req.http.Fastly-Cachetype = "ERROR";
set beresp.ttl = 1s;
set beresp.grace = 5s;
if (beresp.http.Fastly-Backend-Name ~ "mirrorS3") {
Expand Down
3 changes: 0 additions & 3 deletions modules/bouncer/bouncer.vcl.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,14 @@ sub vcl_fetch {
}

if (beresp.http.Set-Cookie) {
set req.http.Fastly-Cachetype = "SETCOOKIE";
return (pass);
}

if (beresp.http.Cache-Control ~ "private") {
set req.http.Fastly-Cachetype = "PRIVATE";
return (pass);
}

if (beresp.status == 500 || beresp.status == 503) {
set req.http.Fastly-Cachetype = "ERROR";
set beresp.ttl = 1s;
set beresp.grace = 5s;
return (deliver);
Expand Down
2 changes: 0 additions & 2 deletions modules/www/www.vcl.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ sub vcl_fetch {
}

if (beresp.status >= 500 && beresp.status <= 599) {
set req.http.Fastly-Cachetype = "ERROR";
set beresp.ttl = 1s;
set beresp.grace = 5s;
if (beresp.http.Fastly-Backend-Name ~ "^mirror") {
Expand All @@ -397,7 +396,6 @@ sub vcl_fetch {
}

if (beresp.http.Cache-Control ~ "private") {
set req.http.Fastly-Cachetype = "PRIVATE";
return (pass);
}

Expand Down

0 comments on commit 9ca6982

Please sign in to comment.