소스 검색

Update Emby.Server.Implementations/HttpServer/HttpListenerHost.cs from review

Co-authored-by: Cody Robibero <cody@robibe.ro>
Frank Riley 5 년 전
부모
커밋
c70c589236
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Emby.Server.Implementations/HttpServer/HttpListenerHost.cs

+ 2 - 2
Emby.Server.Implementations/HttpServer/HttpListenerHost.cs

@@ -455,9 +455,9 @@ namespace Emby.Server.Implementations.HttpServer
                 if (string.Equals(httpReq.Verb, "OPTIONS", StringComparison.OrdinalIgnoreCase))
                 {
                     httpRes.StatusCode = 200;
-                    foreach(KeyValuePair<string, string> header in GetCorsHeaders(httpReq))
+                    foreach(var (key, value) in GetCorsHeaders(httpReq))
                     {
-                        httpRes.Headers.Add(header.Key, header.Value);
+                        httpRes.Headers.Add(key, value);
                     }
                     httpRes.ContentType = "text/plain";
                     await httpRes.WriteAsync(string.Empty, cancellationToken).ConfigureAwait(false);