mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Reuse existing CORS function
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user