From b7ed993d9d67f84d50f5dab292c469e23e55a0fe Mon Sep 17 00:00:00 2001 From: Chris R Date: Fri, 21 Apr 2017 19:02:11 -0700 Subject: [PATCH] Remove obsolete Azure ForwardedHeaders workaround. (#359) --- .../WebHostBuilderIISExtensions.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IISIntegration/WebHostBuilderIISExtensions.cs b/src/Microsoft.AspNetCore.Server.IISIntegration/WebHostBuilderIISExtensions.cs index 6f7f977c13..ac9c19abc6 100644 --- a/src/Microsoft.AspNetCore.Server.IISIntegration/WebHostBuilderIISExtensions.cs +++ b/src/Microsoft.AspNetCore.Server.IISIntegration/WebHostBuilderIISExtensions.cs @@ -57,13 +57,6 @@ namespace Microsoft.AspNetCore.Hosting services.Configure(options => { options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; - - // https://github.com/aspnet/IISIntegration/issues/140 - // Azure Web Sites needs to be treated specially as we get an imbalanced set of X-Forwarded-* headers. - // We use the existence of the %WEBSITE_INSTANCE_ID% environment variable to determine if we're running - // in this environment, and if so we disable the symmetry check. - var isAzure = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("WEBSITE_INSTANCE_ID")); - options.RequireHeaderSymmetry = !isAzure; }); }); }