Attempt to cache items on index page

This commit is contained in:
Ruben van de Ven 2022-05-31 11:19:07 +02:00
parent 5eb9b934f4
commit cc362e5ceb

View file

@ -382,6 +382,8 @@ class AnnotationHandler(tornado.web.RequestHandler):
if extension == "svg": if extension == "svg":
self.set_header("Content-Type", "image/svg+xml") self.set_header("Content-Type", "image/svg+xml")
self.set_header("Cache-Control", "max-age=31536000, immutable")
self.write(annotation.get_as_svg()) self.write(annotation.get_as_svg())
elif extension == "mp3": elif extension == "mp3":
self.set_header("Content-Type", "audio/mp3") self.set_header("Content-Type", "audio/mp3")