mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-27 04:08:33 +00:00
Don't throw exception on unauthenticated requests
This commit is contained in:
parent
8868b34d78
commit
4a28f46cac
4 changed files with 14 additions and 2 deletions
|
|
@ -35,7 +35,12 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
/// <inheritdoc />
|
||||
public async Task WebSocketRequestHandler(HttpContext context)
|
||||
{
|
||||
_ = await _authService.Authenticate(context.Request).ConfigureAwait(false);
|
||||
var authorizationInfo = await _authService.Authenticate(context.Request).ConfigureAwait(false);
|
||||
if (!authorizationInfo.IsAuthenticated)
|
||||
{
|
||||
throw new SecurityException("Token is required");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_logger.LogInformation("WS {IP} request", context.Connection.RemoteIpAddress);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue