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

Co-authored-by: Cody Robibero <cody@robibe.ro>
pull/3084/head
Frank Riley 5 years ago
parent 3cb6fd8a27
commit c70c589236

@ -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);

Loading…
Cancel
Save