Fix for reverse proxy when using the wizard

pull/531/head
Devin Buhl 9 years ago committed by GitHub
parent 808134599a
commit 5b30a1d50f

@ -53,14 +53,15 @@ namespace PlexRequests.UI.Modules
private Response CheckAuth() private Response CheckAuth()
{ {
var settings = PlexRequestSettings.GetSettings(); var settings = PlexRequestSettings.GetSettings();
var baseUrl = settings.BaseUrl;
// Have we been through the wizard? // Have we been through the wizard?
if (!settings.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"; var redirectPath = string.IsNullOrEmpty(baseUrl) ? "~/userlogin" : $"~/{baseUrl}/userlogin";
return Session[SessionKeys.UsernameKey] == null return Session[SessionKeys.UsernameKey] == null

Loading…
Cancel
Save