feat(ingress): migrate nginx annotation proxy_set_header to HAProxy#677
Open
x10an14-nav wants to merge 2 commits into
Open
feat(ingress): migrate nginx annotation proxy_set_header to HAProxy#677x10an14-nav wants to merge 2 commits into
proxy_set_header to HAProxy#677x10an14-nav wants to merge 2 commits into
Conversation
This preserves request-header behavior for applications relying on `nginx.ingress.kubernetes.io/configuration-snippet` during ingress migration. ``` HAProxy header names are case-insensitive, including the req.fhdr(...) lookup we use. Sources: - HAProxy docs, HTTP request headers: https://docs.haproxy.org/2.8/configuration.html#1.2.2 Quote: > Contrary to a common misconception, header names are not case-sensitive Also: > Internally, all header names are normalized to lower case so that HTTP/1.x and HTTP/2 use the exact same representation - HAProxy docs, hdr(<name>): https://docs.haproxy.org/2.8/configuration.html#4.2-balance Quote: > the header name in parenthesis is not case sensitive - HAProxy source confirms req.fhdr(...) uses http_get_htx_fhdr(...), which calls http_find_header(...). - http_find_header(...) uses isteqi(n, name) for exact header-name matching. - isteqi(...) is HAProxy’s case-insensitive string equality function. Conclusion: - %[req.fhdr(x-client-ip)] - %[req.fhdr(X-Client-IP)] - %[req.fhdr(X-CLIENT-IP)] all target the same request header name in HAProxy. ```
aa5ec2b to
c845e95
Compare
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.
This preserves request-header behavior for applications relying on
nginx.ingress.kubernetes.io/configuration-snippetduring ingress migration.