Merge pull request #3037 from ConfusedPolarBear/access-control
Fix CORS header not being added to exceptions
This commit is contained in:
commit
d9e2f56bd2
|
@ -496,6 +496,15 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
{
|
{
|
||||||
var requestInnerEx = GetActualException(requestEx);
|
var requestInnerEx = GetActualException(requestEx);
|
||||||
var statusCode = GetStatusCode(requestInnerEx);
|
var statusCode = GetStatusCode(requestInnerEx);
|
||||||
|
|
||||||
|
foreach (var (key, value) in GetDefaultCorsHeaders(httpReq))
|
||||||
|
{
|
||||||
|
if (!httpRes.Headers.ContainsKey(key))
|
||||||
|
{
|
||||||
|
httpRes.Headers.Add(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool ignoreStackTrace =
|
bool ignoreStackTrace =
|
||||||
requestInnerEx is SocketException
|
requestInnerEx is SocketException
|
||||||
|| requestInnerEx is IOException
|
|| requestInnerEx is IOException
|
||||||
|
|
Loading…
Reference in New Issue
Block a user