Skip to content

Commit

Permalink
feat: Strip port from host if user specifies a Hostname (#1389)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* or logic for listener.Hostname, route.Hostanmes()

Signed-off-by: Arko Dasgupta <[email protected]>

* fix more yaml

Signed-off-by: Arko Dasgupta <[email protected]>

---------

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg authored May 4, 2023
1 parent 99b41a2 commit b84b88a
Show file tree
Hide file tree
Showing 59 changed files with 995 additions and 688 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ gatewayClass:
namespace: envoy-gateway-system
status:
conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Valid GatewayClass
reason: Accepted
status: "True"
Expand Down Expand Up @@ -131,12 +131,12 @@ gateways:
listeners:
- attachedRoutes: 1
conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Sending translated listener configuration to the data plane
reason: Programmed
status: "True"
type: Programmed
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Listener has been successfully translated
reason: Accepted
status: "True"
Expand All @@ -147,12 +147,12 @@ gateways:
kind: TCPRoute
- attachedRoutes: 1
conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Sending translated listener configuration to the data plane
reason: Programmed
status: "True"
type: Programmed
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Listener has been successfully translated
reason: Accepted
status: "True"
Expand All @@ -163,12 +163,12 @@ gateways:
kind: UDPRoute
- attachedRoutes: 1
conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Sending translated listener configuration to the data plane
reason: Programmed
status: "True"
type: Programmed
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Listener has been successfully translated
reason: Accepted
status: "True"
Expand All @@ -179,12 +179,12 @@ gateways:
kind: TLSRoute
- attachedRoutes: 1
conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Sending translated listener configuration to the data plane
reason: Programmed
status: "True"
type: Programmed
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Listener has been successfully translated
reason: Accepted
status: "True"
Expand All @@ -195,12 +195,12 @@ gateways:
kind: HTTPRoute
- attachedRoutes: 1
conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Sending translated listener configuration to the data plane
reason: Programmed
status: "True"
type: Programmed
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Listener has been successfully translated
reason: Accepted
status: "True"
Expand Down Expand Up @@ -234,12 +234,12 @@ grpcRoutes:
status:
parents:
- conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Route is accepted
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
Expand Down Expand Up @@ -272,12 +272,12 @@ httpRoutes:
status:
parents:
- conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Route is accepted
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
Expand All @@ -304,12 +304,12 @@ tcpRoutes:
status:
parents:
- conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Route is accepted
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
Expand Down Expand Up @@ -337,12 +337,12 @@ tlsRoutes:
status:
parents:
- conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Route is accepted
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
Expand Down Expand Up @@ -370,12 +370,12 @@ udpRoutes:
status:
parents:
- conditions:
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Route is accepted
reason: Accepted
status: "True"
type: Accepted
- lastTransitionTime: "2023-04-23T13:09:06Z"
- lastTransitionTime: "2023-05-03T18:41:22Z"
message: Resolved all the Object references for the Route
reason: ResolvedRefs
status: "True"
Expand Down Expand Up @@ -630,18 +630,19 @@ xds:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
rds:
configSource:
ads: {}
resourceApiVersion: V3
routeConfigName: default-eg-http
statPrefix: http
stripAnyHostPort: true
upgradeConfigs:
- upgradeType: websocket
useRemoteAddress: true
normalizePath: true
mergeSlashes: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
name: default-eg-http
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down Expand Up @@ -678,16 +679,17 @@ xds:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
rds:
configSource:
ads: {}
resourceApiVersion: V3
routeConfigName: default-eg-grpc
statPrefix: http
stripAnyHostPort: true
useRemoteAddress: true
normalizePath: true
mergeSlashes: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
name: default-eg-grpc
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down Expand Up @@ -824,4 +826,3 @@ xds:
name: default-backend-rule-0-match-0-www.grpc-example.com
route:
cluster: default-backend-rule-0-match-0-www.grpc-example.com

Loading

0 comments on commit b84b88a

Please sign in to comment.