From b67c4b5437095ecda2ffaef0856020212282ff33 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Tue, 31 Oct 2023 02:45:13 +0100 Subject: [PATCH] Add a Vary Fastly-SSL so that caches will not re-use http responses in https requests, because that breaks zypper/libcurl which does not allow downgrades in redirects. --- lib/MirrorCache/WebAPI/Plugin/RenderFileFromMirror.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MirrorCache/WebAPI/Plugin/RenderFileFromMirror.pm b/lib/MirrorCache/WebAPI/Plugin/RenderFileFromMirror.pm index b6ae9e2e..c5d439e0 100644 --- a/lib/MirrorCache/WebAPI/Plugin/RenderFileFromMirror.pm +++ b/lib/MirrorCache/WebAPI/Plugin/RenderFileFromMirror.pm @@ -153,7 +153,7 @@ sub register { return undef; } $c->log->error($c->dumper('RENDER FILE_ID', $file->{id})) if $MCDEBUG; - $c->res->headers->vary('Accept, COUNTRY, X-COUNTRY'); + $c->res->headers->vary('Accept, COUNTRY, X-COUNTRY, Fastly-SSL'); my $baseurl; # just hostname + eventual urldir (without folder and file) my $fullurl; # baseurl with path and filename if ($dm->metalink || $dm->meta4 || $dm->torrent || $dm->zsync || $dm->magnet) {