From e40483525b48e2ee26be00a2b68f1f578c593428 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 27 Aug 2018 21:41:11 -0700 Subject: [PATCH] Redirect root to http_root --- plexpy/webstart.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plexpy/webstart.py b/plexpy/webstart.py index 17525bdd..293dc9a8 100644 --- a/plexpy/webstart.py +++ b/plexpy/webstart.py @@ -202,6 +202,8 @@ def initialize(options): # Prevent time-outs cherrypy.engine.timeout_monitor.unsubscribe() cherrypy.tree.mount(WebInterface(), options['http_root'], config=conf) + if plexpy.HTTP_ROOT != '/': + cherrypy.tree.mount(BaseRedirect(), '/') try: logger.info(u"Tautulli WebStart :: Starting Tautulli web server on %s://%s:%d%s", protocol, @@ -218,3 +220,9 @@ def initialize(options): sys.exit(1) cherrypy.server.wait() + + +class BaseRedirect(object): + @cherrypy.expose + def index(self): + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT)