Merge pull request #3037 from ConfusedPolarBear/access-control

Fix CORS header not being added to exceptions
pull/3144/head
Vasily 5 years ago committed by GitHub
commit d9e2f56bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -496,6 +496,15 @@ namespace Emby.Server.Implementations.HttpServer
{
var requestInnerEx = GetActualException(requestEx);
var statusCode = GetStatusCode(requestInnerEx);
foreach (var (key, value) in GetDefaultCorsHeaders(httpReq))
{
if (!httpRes.Headers.ContainsKey(key))
{
httpRes.Headers.Add(key, value);
}
}
bool ignoreStackTrace =
requestInnerEx is SocketException
|| requestInnerEx is IOException

Loading…
Cancel
Save