2
0
Эх сурвалжийг харах

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

Co-authored-by: Cody Robibero <cody@robibe.ro>
Frank Riley 5 жил өмнө
parent
commit
c70c589236

+ 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))
                 if (string.Equals(httpReq.Verb, "OPTIONS", StringComparison.OrdinalIgnoreCase))
                 {
                 {
                     httpRes.StatusCode = 200;
                     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";
                     httpRes.ContentType = "text/plain";
                     await httpRes.WriteAsync(string.Empty, cancellationToken).ConfigureAwait(false);
                     await httpRes.WriteAsync(string.Empty, cancellationToken).ConfigureAwait(false);