mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-08 02:34:19 -04:00
Redirect to default if root is requested
This commit is contained in:
parent
2b5762fc68
commit
dfc776e451
@ -66,6 +66,14 @@ namespace Jellyfin.Server.Middleware
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (string.IsNullOrEmpty(localPath)
|
||||||
|
|| localPath.Equals("/", StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
// Always redirect back to the default path if root is requested.
|
||||||
|
_logger.LogDebug("Normalizing an URL at {LocalPath}", localPath);
|
||||||
|
httpContext.Response.Redirect("/" + _configuration[ConfigurationExtensions.DefaultRedirectKey]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await _next(httpContext).ConfigureAwait(false);
|
await _next(httpContext).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user