diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-08-09 20:02:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-09 20:02:15 +0200 |
| commit | e9c9fc436907d5adaeb73a11603bfb4675f491ec (patch) | |
| tree | 444268f8dc58b554ae4cf2f974cb590a244466d9 | |
| parent | f4302822f07111badb7f6439f1ede3ab77779030 (diff) | |
| parent | fc01bdb91ddb14740a9f04d521370d06dd7bcf83 (diff) | |
Merge pull request #3858 from cvium/fix_wizard_redirect
Fix startup wizard redirect
| -rw-r--r-- | Jellyfin.Api/Controllers/DashboardController.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/DashboardController.cs b/Jellyfin.Api/Controllers/DashboardController.cs index a7bdb24f6..33abe3ccd 100644 --- a/Jellyfin.Api/Controllers/DashboardController.cs +++ b/Jellyfin.Api/Controllers/DashboardController.cs @@ -11,6 +11,7 @@ using MediaBrowser.Controller.Plugins; using MediaBrowser.Model.Net; using MediaBrowser.Model.Plugins; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; @@ -202,10 +203,11 @@ namespace Jellyfin.Api.Controllers var path = resourceName; var basePath = WebClientUiPath; + var requestPathAndQuery = Request.GetEncodedPathAndQuery(); // Bounce them to the startup wizard if it hasn't been completed yet if (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted - && !Request.Path.Value.Contains("wizard", StringComparison.OrdinalIgnoreCase) - && Request.Path.Value.Contains("index", StringComparison.OrdinalIgnoreCase)) + && !requestPathAndQuery.Contains("wizard", StringComparison.OrdinalIgnoreCase) + && requestPathAndQuery.Contains("index", StringComparison.OrdinalIgnoreCase)) { return Redirect("index.html?start=wizard#!/wizardstart.html"); } |
