From 9fcf04e53ab3e16c9adcdc36c67ba0a38ae02ba6 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 11 Feb 2025 16:21:43 +0000 Subject: [PATCH] mirrors: Ask clients to not cache the redirect Signed-off-by: Michael Tremer --- src/web/mirrors.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/web/mirrors.py b/src/web/mirrors.py index b16c1d35..4ea0d770 100644 --- a/src/web/mirrors.py +++ b/src/web/mirrors.py @@ -145,6 +145,9 @@ class DownloadsHandler(base.BaseHandler): if not await self.backend.stat(path, stat.S_IFREG): raise tornado.web.HTTPError(404) + # Tell the clients to never cache the redirect + self.set_header("Cache-Control", "no-store") + # Fetch all mirrors for this client mirrors = await self.backend.mirrors.get_mirrors_for_address(self.current_address) -- 2.47.2