mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-05 21:33:02 +02:00
Reuse existing CORS function
This commit is contained in:
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…
Reference in a new issue