diff options
| author | crobibero <cody@robibe.ro> | 2020-09-05 09:00:55 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-05 09:00:55 -0600 |
| commit | 8a08111adcc03d93acec60c783d204f98e99c83a (patch) | |
| tree | d7591de2a59fd6be64573995c6fd6de44eae67f1 /Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs | |
| parent | 1de22af6466a691e023dd70b2032d5e3af3bdc6b (diff) | |
| parent | 6d154041b9e456ab97e1066f525e4d9732fb672a (diff) | |
Merge remote-tracking branch 'upstream/master' into dynamic-cors
Diffstat (limited to 'Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs')
| -rw-r--r-- | Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs | 6 |
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); |
