Browse Source

Update Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
Cody Robibero 3 years ago
parent
commit
bdbac12d4f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs

+ 1 - 1
Jellyfin.Server/Middleware/BaseUrlRedirectionMiddleware.cs

@@ -59,7 +59,7 @@ namespace Jellyfin.Server.Middleware
                 }
                 }
 
 
                 if (!startsWithBaseUrl
                 if (!startsWithBaseUrl
-                    || localPath.Equals(baseUrlPrefix, StringComparison.OrdinalIgnoreCase)
+                    || localPath.Length == baseUrlPrefix.Length
                     // Local path is /baseUrl/
                     // Local path is /baseUrl/
                     || (localPath.Length == baseUrlPrefix.Length + 1 && localPath[^1] == '/'))
                     || (localPath.Length == baseUrlPrefix.Length + 1 && localPath[^1] == '/'))
                 {
                 {