Skip to content

Conversation

BrennanConroy
Copy link
Member

Revert logging severity in ForwardedHeaders middleware

Description

As part of strengthening our security posture in the ForwardedHeaders middleware we increased the severity of a log from Debug to Warning hoping to give consumers a more obvious signal that unexpected requests were hitting their application.

Unfortunately, that change doesn't have the intended effect as it's not uncommon to receive valid requests that have unknown IP addresses in the forwarded headers. e.g. In a proxy scenario where the proxy isn't hosted in a well-defined IP range, or a request goes through many proxy layers and the application is only aware of the last layer, etc.

Customer Impact

Customers are receiving lots of Warning logs, which may trigger telemetry checks, unexpectedly increase log storage size, etc.

Regression?

  • Yes
  • No

Change was intended as a signal that unexpected requests were being received, which isn't really accurate in real apps.

Risk

  • High
  • Medium
  • Low

Just changing a log level to what it was before.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.1

  • Make necessary changes in eng/PatchConfig.props

@BrennanConroy BrennanConroy requested a review from a team as a code owner October 17, 2025 19:12
@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 19:12
@BrennanConroy BrennanConroy added the Servicing-approved Shiproom has approved the issue label Oct 17, 2025
@BrennanConroy BrennanConroy requested a review from wtgodbe October 17, 2025 19:12
Copy link
Contributor

Hi @@BrennanConroy. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Reverts the log level for unknown proxy detection in ForwardedHeadersMiddleware from Warning back to Debug to reduce unnecessary elevated telemetry. Also updates patch configuration to include the HttpOverrides package for servicing.

  • Lowered log severity for unknown proxy detection
  • Added Microsoft.AspNetCore.HttpOverrides to patch package list

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs Adjusts logging level for unknown proxy from Warning to Debug.
eng/PatchConfig.props Includes HttpOverrides package in 2.3.7 patch configuration.

@wtgodbe wtgodbe merged commit 8469131 into release/2.3 Oct 17, 2025
2 of 4 checks passed
@wtgodbe wtgodbe deleted the BrennanConroy-patch-6 branch October 17, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants