From 4f84ed71428e69d60a1985429e47b7128f4ee90b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 24 Jul 2023 15:12:19 +0000 Subject: [PATCH] API: Tell browsers to not cache any responses Signed-off-by: Michael Tremer --- src/web/base.py | 4 ++++ 1 file changed, 4 insertions(+) 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): -- 2.47.3