]> git.ipfire.org Git - ipfire.org.git/commitdiff
API: Tell browsers to not cache any responses
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 24 Jul 2023 15:12:19 +0000 (15:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 24 Jul 2023 15:12:19 +0000 (15:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/base.py

index 504ab5961e79b702a34453c52318be6247570030..ad2175173a6287bf18b42a2f7e9db01dda5eef41 100644 (file)
@@ -230,6 +230,10 @@ class APIHandler(BaseHandler):
                """
                pass
 
+       def prepare(self):
+               # Do not cache any API communication
+               self.set_header("Cache-Control", "no-cache")
+
 
 class NotFoundHandler(BaseHandler):
        def prepare(self):