From f3ca24f4f5c682ac65380545dac95ee094e550a8 Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Mon, 21 Oct 2019 12:44:40 +0000 Subject: [PATCH] mgr/dashboard: Disable cache for static files Browser's caching sometimes prevents changing the language of the dashboard. We now send a header telling the browser to never cache those files. Fixes: https://tracker.ceph.com/issues/42376 Signed-off-by: Tiago Melo (cherry picked from commit ee4c8bc1a030b9886abca6790804e48ad28bfc11) --- src/pybind/mgr/dashboard/controllers/home.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pybind/mgr/dashboard/controllers/home.py b/src/pybind/mgr/dashboard/controllers/home.py index 82ad945d0b00c..23318983829a0 100644 --- a/src/pybind/mgr/dashboard/controllers/home.py +++ b/src/pybind/mgr/dashboard/controllers/home.py @@ -110,6 +110,8 @@ class HomeController(BaseController): cherrypy.response.headers['Vary'] = "{}, Accept-Language" else: cherrypy.response.headers['Vary'] = "Accept-Language" + + cherrypy.response.headers['Cache-control'] = "no-cache" return serve_file(full_path) -- 2.39.5