dotnet / dotnet/yarp

RequestHeaderOriginalHost when Host is IP Address

Open
#2,813 2 comments 0 reactions 0 assignees View on GitHub
Type: Idea
Dominant language
C#
Stars
9.6k
Forks
933
Avg merge
12d 18h
Merged PRs (30d)
2

Description

Our application makes use of the Host header and so we use the `RequestHeaderOriginalHost` option in YARP. But there are certain healthcheck endpoints which get called by IP address and forwarding the IP Address as the Host header causes IIS to return a 400: `HTTP Error 400. The request hostname is invalid.`.

It would be helpful if the `RequestHeaderOriginalHost` option didn't copy the Host header if it was an IP address or there was an option for that behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.