-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/envoy/v3: RouteConfiguration ignores port when choosing virtualhost #5437
internal/envoy/v3: RouteConfiguration ignores port when choosing virtualhost #5437
Conversation
…ualhost Previously we stripped the port from the Host header when matching a virtualhost, which also resulted in the header being modified for the downstream. For Gateway API conformance, we no longer want to do this. This basically reverts projectcontour#3458 and uses the newer RouteConfiguration field that allows us to ignore port when choosing a virtualhost. We reintroduce the logic in the SNI/Host misdirected request Lua to strip the port when checking the hostname against SNI. Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
huh the ingress test fails but almost identical gateway one passes |
ah, the header regex match on a single DNS label seems to be doing it, it relies on the port not being present |
needs to ignore port if present Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5437 +/- ##
=======================================
Coverage 78.18% 78.18%
=======================================
Files 138 138
Lines 18496 18496
=======================================
Hits 14462 14462
Misses 3757 3757
Partials 277 277
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming E2E's are happy now, :authority
header match change make sense
Looks like gateway-conformance failure is just the TLSRoute flake that should be fixed with 0.7.1.
Previously we stripped the port from the Host header when matching a virtualhost, which also resulted in the header being modified for the downstream. For Gateway API conformance, we no longer want to do this.
This basically reverts #3458 and uses the newer RouteConfiguration field that allows us to ignore port when choosing a virtualhost. We reintroduce the logic in the SNI/Host misdirected request Lua to strip the port when checking the hostname against SNI.