mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Use simpler dictionary iterator.
This commit is contained in:
parent
c70c589236
commit
6990af811a
@ -37,9 +37,9 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
/// <param name="dto">The dto.</param>
|
/// <param name="dto">The dto.</param>
|
||||||
public void FilterResponse(IRequest req, HttpResponse res, object dto)
|
public void FilterResponse(IRequest req, HttpResponse res, object dto)
|
||||||
{
|
{
|
||||||
foreach(KeyValuePair<string, string> header in _server.GetCorsHeaders(req))
|
foreach(var (key, value) in _server.GetCorsHeaders(req))
|
||||||
{
|
{
|
||||||
res.Headers.Add(header.Key, header.Value);
|
res.Headers.Add(key, value);
|
||||||
}
|
}
|
||||||
// Try to prevent compatibility view
|
// Try to prevent compatibility view
|
||||||
res.Headers["Access-Control-Allow-Headers"] = ("Accept, Accept-Language, Authorization, Cache-Control, " +
|
res.Headers["Access-Control-Allow-Headers"] = ("Accept, Accept-Language, Authorization, Cache-Control, " +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user