diff --git a/plexpy/webauth.py b/plexpy/webauth.py index e9cc15b0..805bec7c 100644 --- a/plexpy/webauth.py +++ b/plexpy/webauth.py @@ -119,7 +119,7 @@ def check_auth(*args, **kwargs): if not condition(): raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT) else: - raise cherrypy.HTTPRedirect("auth/logout") + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "auth/logout") def requireAuth(*conditions): """A decorator that appends conditions to the auth.require config @@ -204,7 +204,7 @@ class AuthController(object): @cherrypy.expose def index(self): - raise cherrypy.HTTPRedirect("login") + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "auth/login") @cherrypy.expose def login(self, username=None, password=None, remember_me='0', admin_login='0'): @@ -257,4 +257,4 @@ class AuthController(object): if _session and _session['user']: cherrypy.request.login = None self.on_logout(_session['user'], _session['user_group']) - raise cherrypy.HTTPRedirect("login") \ No newline at end of file + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "auth/login") \ No newline at end of file diff --git a/plexpy/webserve.py b/plexpy/webserve.py index cc01fac1..4b554882 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -82,9 +82,9 @@ class WebInterface(object): @requireAuth() def index(self): if plexpy.CONFIG.FIRST_RUN_COMPLETE: - raise cherrypy.HTTPRedirect("home") + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "home") else: - raise cherrypy.HTTPRedirect("welcome") + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "welcome") ##### Welcome ##### @@ -118,7 +118,7 @@ class WebInterface(object): # The setup wizard just refreshes the page on submit so we must redirect to home if config set. if plexpy.CONFIG.FIRST_RUN_COMPLETE: plexpy.initialize_scheduler() - raise cherrypy.HTTPRedirect("home") + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "home") else: return serve_template(templatename="welcome.html", title="Welcome", config=config) @@ -2215,7 +2215,7 @@ class WebInterface(object): log_dir=plexpy.CONFIG.LOG_DIR, verbose=plexpy.VERBOSE) logger.info(u"Verbose toggled, set to %s", plexpy.VERBOSE) logger.debug(u"If you read this message, debug logging is available") - raise cherrypy.HTTPRedirect("logs") + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "logs") @cherrypy.expose @requireAuth() @@ -2857,7 +2857,7 @@ class WebInterface(object): @requireAuth(member_of("admin")) def checkGithub(self): versioncheck.checkGithub() - raise cherrypy.HTTPRedirect("home") + raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "home") @cherrypy.expose @requireAuth(member_of("admin"))