From: Ricardo Marques Date: Mon, 23 Jul 2018 14:43:04 +0000 (+0100) Subject: mgr/dashboard: Fix cherrypy static content URL prefix config X-Git-Tag: v13.2.2~36^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be4c42a9393e9b8ae00ca6124a22bd125fa24ec3;p=ceph.git mgr/dashboard: Fix cherrypy static content URL prefix config Fixes: https://tracker.ceph.com/issues/25067 Signed-off-by: Ricardo Marques (cherry picked from commit a36eff1e51928777f9efda62da723902257f9d48) --- diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index 87ecdcb672da..a3934e93a8b2 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -276,7 +276,7 @@ class Module(MgrModule, SSLCherryPyConfig): mapper = generate_routes(self.url_prefix) config = { - '{}/'.format(self.url_prefix): { + self.url_prefix or '/': { 'tools.staticdir.on': True, 'tools.staticdir.dir': self.get_frontend_path(), 'tools.staticdir.index': 'index.html'