Skip to content

default ForwardedHeader configutaion #57017

Open
@WeihanLi

Description

@WeihanLi

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

When running behind a reverse proxy, we need to use the forwarded headers to get the real request info, currently, we have ASPNETCORE_FORWARDEDHEADERS_ENABLED env config to enable the forwarded headers middleware, but we still need to configure the ForwardedHeadersOptions manually in our code, how about support configure the options from configuration like the ASPNETCORE_FORWARDEDHEADERS_ENABLED env, so that we could configure forwarded header related from configuration only, no need to make updates in code

Describe the solution you'd like

maybe add similar configs like
ASPNETCORE_FORWARDEDHEADERS_Headers/ASPNETCORE_FORWARDEDHEADERS_Networks/ASPNETCORE_FORWARDEDHEADERS_Proxy

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions