]> git.ipfire.org Git - pbs.git/commitdiff
mirrors: Ask clients to not cache the redirect
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Feb 2025 16:21:43 +0000 (16:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Feb 2025 16:21:43 +0000 (16:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/mirrors.py

index b16c1d35e9e07367f53fcb3fbc5817fdf96cdcb4..4ea0d7707b5bd8cb1d6df1121327d77f5517fcde 100644 (file)
@@ -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)