Reuse existing CORS function

pull/3037/head
ConfusedPolarBear 5 years ago
parent 3a61c9a878
commit 85f04af04c

@ -497,9 +497,9 @@ namespace Emby.Server.Implementations.HttpServer
var requestInnerEx = GetActualException(requestEx);
var statusCode = GetStatusCode(requestInnerEx);
if (!httpRes.Headers.ContainsKey("Access-Control-Allow-Origin"))
foreach (var (key, value) in GetDefaultCorsHeaders(httpReq))
{
httpRes.Headers.Add("Access-Control-Allow-Origin", "*");
httpRes.Headers.Add(key, value);
}
bool ignoreStackTrace =

Loading…
Cancel
Save