From d3e8419927cecd99bfe08f11dd745a2da8b1ba3d Mon Sep 17 00:00:00 2001 From: D Chua Date: Fri, 1 Dec 2023 11:15:06 +0000 Subject: [PATCH] Remove deprecated use of Fastly-Cachetype header It's unused by Fastly and has been deprecated. For more information see https://developer.fastly.com/reference/http/http-headers/Fastly-Cachetype/ --- modules/assets/assets.vcl.tftpl | 2 -- modules/bouncer/bouncer.vcl.tftpl | 3 --- modules/www/www.vcl.tftpl | 2 -- 3 files changed, 7 deletions(-) diff --git a/modules/assets/assets.vcl.tftpl b/modules/assets/assets.vcl.tftpl index 321860d..f33c468 100644 --- a/modules/assets/assets.vcl.tftpl +++ b/modules/assets/assets.vcl.tftpl @@ -275,7 +275,6 @@ sub vcl_fetch { } if (beresp.http.Cache-Control ~ "private") { - set req.http.Fastly-Cachetype = "PRIVATE"; return (pass); } @@ -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") { diff --git a/modules/bouncer/bouncer.vcl.tftpl b/modules/bouncer/bouncer.vcl.tftpl index cf0849e..1de34f2 100644 --- a/modules/bouncer/bouncer.vcl.tftpl +++ b/modules/bouncer/bouncer.vcl.tftpl @@ -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); diff --git a/modules/www/www.vcl.tftpl b/modules/www/www.vcl.tftpl index cfd3199..620a3c8 100644 --- a/modules/www/www.vcl.tftpl +++ b/modules/www/www.vcl.tftpl @@ -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") { @@ -397,7 +396,6 @@ sub vcl_fetch { } if (beresp.http.Cache-Control ~ "private") { - set req.http.Fastly-Cachetype = "PRIVATE"; return (pass); }