diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 043812290..7de4f168c 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -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