Fixed comment and log message for ForwardedHeadersMiddleware (#357)

- Updated comment to reflect the addition of RequireHeaderSymmetry
- Fixed header name on log message
This commit is contained in:
Alfred Myers 2018-08-28 23:01:51 -03:00 committed by Chris Ross
parent 54cba4cafe
commit 2246c6b55b
1 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ namespace Microsoft.AspNetCore.HttpOverrides
public void ApplyForwarders(HttpContext context)
{
// Gather expected headers. Enabled headers must have the same number of entries.
// Gather expected headers.
string[] forwardedFor = null, forwardedProto = null, forwardedHost = null;
bool checkFor = false, checkProto = false, checkHost = false;
int entryCount = 0;
@ -282,7 +282,7 @@ namespace Microsoft.AspNetCore.HttpOverrides
}
else if (_options.RequireHeaderSymmetry)
{
_logger.LogWarning(4, $"Incorrect number of x-forwarded-proto header values, see {nameof(_options.RequireHeaderSymmetry)}.");
_logger.LogWarning(4, $"Incorrect number of x-forwarded-host header values, see {nameof(_options.RequireHeaderSymmetry)}.");
return;
}
}