code cleanup

This commit is contained in:
Paul Schneider 2026-09-16 18:23:42 +01:00
commit 2b1c3d2a9b
Signed by: notazof
GPG key ID: 1DD5D838E5343B06

View file

@ -137,22 +137,6 @@ public static class ServiceExtensions
};
}
options.Events = new JwtBearerEvents
{
OnMessageReceived = context =>
{
// Fallback for clients that cannot reliably attach Authorization header
// on multipart uploads. Restrict query-token support to this endpoint only.
if (string.IsNullOrEmpty(context.Token)
&& context.Request.Path.Value?.Contains("/api/v1/account/set-avatar", StringComparison.OrdinalIgnoreCase) == true
&& context.Request.Query.TryGetValue("access_token", out var tokenValues))
{
context.Token = tokenValues.ToString();
}
return Task.CompletedTask;
}
};
});
return result;