aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-09-04 16:42:40 -0600
committercrobibero <cody@robibe.ro>2020-09-04 16:42:40 -0600
commitd5eb246557f9c943d8e3c5ddcc357ef351425deb (patch)
tree99b257fa694de3c263767aa44c8932ca21348dc2 /Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs
parent4fc611bf29c9d19c333d60c23325ae2b20900de1 (diff)
parentd8c6d291829f6a80ad1c13e039293f04083470f0 (diff)
Merge remote-tracking branch 'upstream/master' into api-stream-return
Diffstat (limited to 'Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs')
-rw-r--r--Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs b/Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs
index 9316737bd..ae3a3a1c5 100644
--- a/Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs
+++ b/Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs
@@ -44,11 +44,7 @@ namespace Jellyfin.Server.Middleware
var localPath = httpContext.Request.Path.ToString();
var baseUrlPrefix = serverConfigurationManager.Configuration.BaseUrl;
- if (string.Equals(localPath, baseUrlPrefix + "/", StringComparison.OrdinalIgnoreCase)
- || string.Equals(localPath, baseUrlPrefix, StringComparison.OrdinalIgnoreCase)
- || string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase)
- || string.IsNullOrEmpty(localPath)
- || !localPath.StartsWith(baseUrlPrefix, StringComparison.OrdinalIgnoreCase))
+ if (!localPath.StartsWith(baseUrlPrefix, StringComparison.OrdinalIgnoreCase))
{
// Always redirect back to the default path if the base prefix is invalid or missing
_logger.LogDebug("Normalizing an URL at {LocalPath}", localPath);