Always allow set credentials header
This commit is contained in:
parent
3c0484cc97
commit
eba0d9e387
|
@ -52,12 +52,10 @@ namespace Jellyfin.Server.Middleware
|
||||||
&& string.Equals(headerValue, "*", StringComparison.Ordinal))
|
&& string.Equals(headerValue, "*", StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
context.Response.Headers[HeaderNames.AccessControlAllowOrigin] = context.Request.Host.Value;
|
context.Response.Headers[HeaderNames.AccessControlAllowOrigin] = context.Request.Host.Value;
|
||||||
_logger.LogDebug("Overwriting CORS response header: {HeaderName}: {HeaderValue}", HeaderNames.AccessControlAllowOrigin, context.Request.Host.Value);
|
|
||||||
|
|
||||||
if (!context.Response.Headers.ContainsKey(HeaderNames.AccessControlAllowCredentials))
|
// Always allow credentials.
|
||||||
{
|
|
||||||
context.Response.Headers[HeaderNames.AccessControlAllowCredentials] = "true";
|
context.Response.Headers[HeaderNames.AccessControlAllowCredentials] = "true";
|
||||||
}
|
_logger.LogDebug("Overwriting CORS response header: {HeaderName}: {HeaderValue}", HeaderNames.AccessControlAllowOrigin, context.Request.Host.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user