mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 22:17:25 -04:00
Use GetEncodedPathAndQuery since ASP.NET Request.Path does not contain query parameters
This commit is contained in:
parent
75bb127599
commit
fc01bdb91d
1 changed files with 4 additions and 2 deletions
|
@ -11,6 +11,7 @@ using MediaBrowser.Controller.Plugins;
|
||||||
using MediaBrowser.Model.Net;
|
using MediaBrowser.Model.Net;
|
||||||
using MediaBrowser.Model.Plugins;
|
using MediaBrowser.Model.Plugins;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Http.Extensions;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
@ -202,10 +203,11 @@ namespace Jellyfin.Api.Controllers
|
||||||
var path = resourceName;
|
var path = resourceName;
|
||||||
var basePath = WebClientUiPath;
|
var basePath = WebClientUiPath;
|
||||||
|
|
||||||
|
var requestPathAndQuery = Request.GetEncodedPathAndQuery();
|
||||||
// Bounce them to the startup wizard if it hasn't been completed yet
|
// Bounce them to the startup wizard if it hasn't been completed yet
|
||||||
if (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted
|
if (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted
|
||||||
&& !Request.Path.Value.Contains("wizard", StringComparison.OrdinalIgnoreCase)
|
&& !requestPathAndQuery.Contains("wizard", StringComparison.OrdinalIgnoreCase)
|
||||||
&& Request.Path.Value.Contains("index", StringComparison.OrdinalIgnoreCase))
|
&& requestPathAndQuery.Contains("index", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return Redirect("index.html?start=wizard#!/wizardstart.html");
|
return Redirect("index.html?start=wizard#!/wizardstart.html");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue