-
Notifications
You must be signed in to change notification settings - Fork 286
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
Dealing with host:port
in Host header
#1368
Comments
ptal @envoyproxy/gateway-maintainers |
vote for 1. strip_any_host_port since its less complex, and easier to maintain, although its a wider match, the user can add an extra
|
Prefer setting |
* This allows us to ignore the port section from the Host header when matching incoming requests based on the Host/Authority header and the Hostname specified by the user Fixes: envoyproxy#1368 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
* This allows us to ignore the port section from the Host header when matching incoming requests based on the Host/Authority header and the Hostname specified by the user Fixes: envoyproxy#1368 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
* This allows us to ignore the port section from the Host header when matching incoming requests based on the Host/Authority header and the Hostname specified by the user Fixes: envoyproxy#1368 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
* Strip port from host if user specifies a Hostname * This allows us to ignore the port section from the Host header when matching incoming requests based on the Host/Authority header and the Hostname specified by the user Fixes: #1368 Signed-off-by: Arko Dasgupta <arko@tetrate.io> * or logic for listener.Hostname, route.Hostanmes() Signed-off-by: Arko Dasgupta <arko@tetrate.io> * fix more yaml Signed-off-by: Arko Dasgupta <arko@tetrate.io> --------- Signed-off-by: Arko Dasgupta <arko@tetrate.io>
This doesn't work actually due to CRD valuation on the |
Description:
We need a way to support the use case when the
Host
header contains a port e.g.example.com:1234
which is valid according to the RFC. This gets tricky because the Gateway API does not intend to allow(more in kubernetes-sigs/gateway-api#1936) specifying
port
in theHostnames
field withGateway
andHTTPRoute
.3 options I can think of as a workaround
Host
header using a knob in Envoy https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto.This gets tricky because incoming service port and container port might differ so we might need to use
strip_any_host_port
instead ofstrip_matching_host_port
.hostname:listener-port
Hostnames
inGateway
orHTTPRoute
and instead relyingon a header match to the
:authority
headerChanges HTTPRoute hostname matching to ignore trailing port numbers. #1311 (comment)
Relates to #1311
The text was updated successfully, but these errors were encountered: