From: Michael Tremer Date: Mon, 24 Jul 2023 15:12:19 +0000 (+0000) Subject: API: Tell browsers to not cache any responses X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f84ed71428e69d60a1985429e47b7128f4ee90b;p=ipfire.org.git API: Tell browsers to not cache any responses Signed-off-by: Michael Tremer --- diff --git a/src/web/base.py b/src/web/base.py index 504ab596..ad217517 100644 --- a/src/web/base.py +++ b/src/web/base.py @@ -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):