Documented the default Host value for an empty proxy_set_header value - #325
Draft
VadimZhestikov wants to merge 1 commit into
Draft
Documented the default Host value for an empty proxy_set_header value#325VadimZhestikov wants to merge 1 commit into
VadimZhestikov wants to merge 1 commit into
Conversation
Since 1.31.4 (dea68dbf126f) an empty "Host" value no longer suppresses the field: the $proxy_host value is passed instead, because the http and https URI schemes require a non-empty host identifier. The same applies to the ":authority" pseudo-header field for HTTP/2 and gRPC. The proxy_set_header and grpc_set_header descriptions still stated that an empty value is never passed, and the proxy_set_header text also stated that nothing is passed when the client sends no "Host" header field, which is the $http_host case. An empty value can therefore no longer be used to suppress the field or as a deny sentinel, so this is noted explicitly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since 1.31.4 (dea68dbf126f) an empty
Hostvalue no longer suppresses thefield: the
$proxy_hostvalue is passed instead, because thehttpandhttpsURI schemes require a non-empty host identifier (RFC 9110, 4.2.1 and4.2.2). The same applies to the
:authoritypseudo-header field for HTTP/2and gRPC.
The reference documentation still described the previous behaviour in three
places:
proxy_set_header-- "If the value of a header field is an empty string thenthis field will not be passed to a proxied server."
proxy_set_header-- "if this field is not present in a client request headerthen nothing will be passed", which is the
$http_hostcase.grpc_set_header-- the same empty-value statement, which now also covers:authority.An empty value can therefore no longer be used to suppress the field, or as a
way to signal that a request should not be proxied, and this is now noted
explicitly. The HTTP/1.0 case, where an empty value still suppresses the
field, is documented as the exception.
Both
xml/enandxml/ruare updated in this change.Opened as a draft.