]> git.ipfire.org Git - ipfire.org.git/commitdiff
docs: Allow browsers to cache images up to one year
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Jan 2024 18:18:01 +0000 (18:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Jan 2024 18:18:01 +0000 (18:18 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/docs.py

index e657302a9c971992f9fc66c259bded6f3532a54b..5f200b041ecabf9bbaa46cf2fd74d2efd4bc835a 100644 (file)
@@ -142,8 +142,9 @@ class FileHandler(base.BaseHandler):
                else:
                        blob = file.blob
 
-               # Set expires
-               self.set_expires(3600)
+               # Allow downstream to cache this for a year
+               if revision:
+                       self.set_expires(31536000)
 
                # Send the payload
                self._deliver_file(blob, filename=file.filename)