]> git.ipfire.org Git - pbs.git/commitdiff
mirrors: Don't send any Content-Type headers
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Feb 2025 15:42:27 +0000 (15:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Feb 2025 15:42:27 +0000 (15:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/mirrors.py

index 7a533e1aa904b0812a2e8b0aeac00605a94e7a0f..ff036414318366a85729d20d8de6f85ff03fc632 100644 (file)
@@ -133,6 +133,10 @@ class DownloadsHandler(base.BaseHandler):
 
                As a last resort, we will try to serve the file locally.
        """
+       def prepare(self):
+               # Don't send any Content-Type header
+               self.clear_header("Content-Type")
+
        @base.ratelimit(limit=100, minutes=60, key="downloads")
        async def get(self, path):
                # Check if the file exists