diff options
| author | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-05-18 16:54:36 -0500 |
|---|---|---|
| committer | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-05-18 16:58:14 -0500 |
| commit | 949e4d3e64a73102d0a87c8b34918397a2cec303 (patch) | |
| tree | 530036d22899eca5edf2e437fcb31f67722245ae | |
| parent | 85f04af04c7d33477df5486ae80b6fa9a2a2bfd7 (diff) | |
Apply suggestions from code review
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 9a4e858a5..7de4f168c 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -499,7 +499,10 @@ namespace Emby.Server.Implementations.HttpServer foreach (var (key, value) in GetDefaultCorsHeaders(httpReq)) { - httpRes.Headers.Add(key, value); + if (!httpRes.Headers.ContainsKey(key)) + { + httpRes.Headers.Add(key, value); + } } bool ignoreStackTrace = |
