From 5b30a1d50fa8ac3faff5a8896e170917b8a33248 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 8 Sep 2016 15:12:22 -0400 Subject: [PATCH] Fix for reverse proxy when using the wizard --- PlexRequests.UI/Modules/BaseAuthModule.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PlexRequests.UI/Modules/BaseAuthModule.cs b/PlexRequests.UI/Modules/BaseAuthModule.cs index d5dde01c9..d3d3de5d9 100644 --- a/PlexRequests.UI/Modules/BaseAuthModule.cs +++ b/PlexRequests.UI/Modules/BaseAuthModule.cs @@ -53,14 +53,15 @@ namespace PlexRequests.UI.Modules private Response CheckAuth() { var settings = PlexRequestSettings.GetSettings(); + + var baseUrl = settings.BaseUrl; + // Have we been through the wizard? if (!settings.Wizard) { - return Context.GetRedirect("~/wizard"); + return Context.GetRedirect(string.IsNullOrEmpty(baseUrl) ? "~/wizard" : $"~/{baseUrl}/wizard"); } - var baseUrl = settings.BaseUrl; - var redirectPath = string.IsNullOrEmpty(baseUrl) ? "~/userlogin" : $"~/{baseUrl}/userlogin"; return Session[SessionKeys.UsernameKey] == null @@ -68,4 +69,4 @@ namespace PlexRequests.UI.Modules : null; } } -} \ No newline at end of file +}