]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Disable cache for static files 33763/head
authorTiago Melo <tmelo@suse.com>
Mon, 21 Oct 2019 12:44:40 +0000 (12:44 +0000)
committerShyukri Shyukriev <shshyukriev@suse.com>
Thu, 5 Mar 2020 19:06:17 +0000 (21:06 +0200)
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 <tmelo@suse.com>
(cherry picked from commit ee4c8bc1a030b9886abca6790804e48ad28bfc11)

src/pybind/mgr/dashboard/controllers/home.py

index 82ad945d0b00c9e682cedfc3084d33e0d823f728..23318983829a0b989fe53b5b174ac0b2d92b2b8a 100644 (file)
@@ -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)