diff --git a/internal/gatewayapi/clienttrafficpolicy.go b/internal/gatewayapi/clienttrafficpolicy.go index 7207a412d58..7804a74f99f 100644 --- a/internal/gatewayapi/clienttrafficpolicy.go +++ b/internal/gatewayapi/clienttrafficpolicy.go @@ -295,6 +295,9 @@ func (t *Translator) translateClientTrafficPolicyForListener(policySpec *egv1a1. // Translate Suppress Envoy Headers translateListenerSuppressEnvoyHeaders(policySpec.SuppressEnvoyHeaders, httpIR) + // Translate Path Settings + translatePathSettings(policySpec.Path, httpIR) + // enable http3 if set and TLS is enabled if httpIR.TLS != nil && policySpec.HTTP3 != nil { httpIR.HTTP3 = &ir.HTTP3Settings{} @@ -346,6 +349,18 @@ func translateListenerTCPKeepalive(tcpKeepAlive *egv1a1.TCPKeepalive, httpIR *ir httpIR.TCPKeepalive = irTCPKeepalive } +func translatePathSettings(pathSettings *egv1a1.PathSettings, httpIR *ir.HTTPListener) { + if pathSettings == nil { + return + } + if pathSettings.DisableMergeSlashes != nil { + httpIR.Path.MergeSlashes = !*pathSettings.DisableMergeSlashes + } + if pathSettings.EscapedSlashesAction != nil { + httpIR.Path.EscapedSlashesAction = ir.PathEscapedSlashAction(*pathSettings.EscapedSlashesAction) + } +} + func translateListenerProxyProtocol(enableProxyProtocol *bool, httpIR *ir.HTTPListener) { // Return early if not set if enableProxyProtocol == nil { diff --git a/internal/gatewayapi/listener.go b/internal/gatewayapi/listener.go index d2dcca0bfe9..1a92c751dea 100644 --- a/internal/gatewayapi/listener.go +++ b/internal/gatewayapi/listener.go @@ -104,6 +104,10 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap Address: "0.0.0.0", Port: uint32(containerPort), TLS: irTLSConfigs(listener.tlsSecrets), + Path: ir.PathSettings{ + MergeSlashes: true, + EscapedSlashesAction: ir.UnescapeAndRedirect, + }, } if listener.Hostname != nil { irListener.Hostnames = append(irListener.Hostnames, string(*listener.Hostname)) diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml index 5650a775eb2..8d808860337 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml @@ -349,6 +349,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -372,6 +375,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml index b1cfd55c79e..67f60a56cdd 100755 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml @@ -308,6 +308,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -341,6 +344,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml index 4e3acbd5931..5d6239cac0e 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml @@ -123,6 +123,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml index cea46c84bc3..4b17ac19de0 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml @@ -241,6 +241,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -271,6 +274,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml index b8b9b641bb3..361a5298381 100755 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml @@ -403,6 +403,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -442,6 +445,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml index 973f153d209..9d5bcd090da 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml @@ -323,6 +323,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -351,6 +354,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml index 97ee75b2266..abc03a88998 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml @@ -149,6 +149,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml index 6190b2759a9..cb2cc3a2d65 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml @@ -153,6 +153,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml index 21d867ab73e..e1ad598d0d0 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-match-type.out.yaml @@ -149,6 +149,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml index ac2dbc8e74b..6aa90e650eb 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml @@ -155,6 +155,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml index c7834e5eedb..b6a440898a5 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml @@ -152,6 +152,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml index fb2433f2f78..9a6a9484204 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml @@ -237,6 +237,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -265,6 +268,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml index 643b6546eed..4a807fcd435 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml @@ -135,6 +135,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml index 500d06ae1c1..9d0268467bb 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml @@ -257,6 +257,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -295,6 +298,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml index 3734775140c..08a24c14b4b 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml @@ -167,6 +167,9 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml index 8e7bb87a6fb..49ba2bb9f81 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml @@ -130,6 +130,9 @@ xdsIR: http3: {} isHTTP2: false name: envoy-gateway/gateway-1/tls + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.in.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.in.yaml new file mode 100644 index 00000000000..9ce6115418c --- /dev/null +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.in.yaml @@ -0,0 +1,36 @@ +clientTrafficPolicies: +- apiVersion: gateway.envoyproxy.io/v1alpha1 + kind: ClientTrafficPolicy + metadata: + namespace: envoy-gateway + name: target-gateway-1 + spec: + path: + disableMergeSlashes: true + escapedSlashesAction: KeepUnchanged + targetRef: + group: gateway.networking.k8s.io + kind: Gateway + name: gateway-1 + namespace: envoy-gateway +gateways: +- apiVersion: gateway.networking.k8s.io/v1 + kind: Gateway + metadata: + namespace: envoy-gateway + name: gateway-1 + spec: + gatewayClassName: envoy-gateway-class + listeners: + - name: http-1 + protocol: HTTP + port: 80 + allowedRoutes: + namespaces: + from: Same + - name: http-2 + protocol: HTTP + port: 8080 + allowedRoutes: + namespaces: + from: Same diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.out.yaml new file mode 100644 index 00000000000..aad6f118e92 --- /dev/null +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-path-settings.out.yaml @@ -0,0 +1,140 @@ +clientTrafficPolicies: +- apiVersion: gateway.envoyproxy.io/v1alpha1 + kind: ClientTrafficPolicy + metadata: + creationTimestamp: null + name: target-gateway-1 + namespace: envoy-gateway + spec: + path: + disableMergeSlashes: true + escapedSlashesAction: KeepUnchanged + targetRef: + group: gateway.networking.k8s.io + kind: Gateway + name: gateway-1 + namespace: envoy-gateway + status: + conditions: + - lastTransitionTime: null + message: ClientTrafficPolicy has been accepted. + reason: Accepted + status: "True" + type: Accepted +gateways: +- apiVersion: gateway.networking.k8s.io/v1 + kind: Gateway + metadata: + creationTimestamp: null + name: gateway-1 + namespace: envoy-gateway + spec: + gatewayClassName: envoy-gateway-class + listeners: + - allowedRoutes: + namespaces: + from: Same + name: http-1 + port: 80 + protocol: HTTP + - allowedRoutes: + namespaces: + from: Same + name: http-2 + port: 8080 + protocol: HTTP + status: + listeners: + - attachedRoutes: 0 + conditions: + - lastTransitionTime: null + message: Sending translated listener configuration to the data plane + reason: Programmed + status: "True" + type: Programmed + - lastTransitionTime: null + message: Listener has been successfully translated + reason: Accepted + status: "True" + type: Accepted + - lastTransitionTime: null + message: Listener references have been resolved + reason: ResolvedRefs + status: "True" + type: ResolvedRefs + name: http-1 + supportedKinds: + - group: gateway.networking.k8s.io + kind: HTTPRoute + - group: gateway.networking.k8s.io + kind: GRPCRoute + - attachedRoutes: 0 + conditions: + - lastTransitionTime: null + message: Sending translated listener configuration to the data plane + reason: Programmed + status: "True" + type: Programmed + - lastTransitionTime: null + message: Listener has been successfully translated + reason: Accepted + status: "True" + type: Accepted + - lastTransitionTime: null + message: Listener references have been resolved + reason: ResolvedRefs + status: "True" + type: ResolvedRefs + name: http-2 + supportedKinds: + - group: gateway.networking.k8s.io + kind: HTTPRoute + - group: gateway.networking.k8s.io + kind: GRPCRoute +infraIR: + envoy-gateway/gateway-1: + proxy: + listeners: + - address: null + name: envoy-gateway/gateway-1/http-1 + ports: + - containerPort: 10080 + name: http-1 + protocol: HTTP + servicePort: 80 + - address: null + name: envoy-gateway/gateway-1/http-2 + ports: + - containerPort: 8080 + name: http-2 + protocol: HTTP + servicePort: 8080 + metadata: + labels: + gateway.envoyproxy.io/owning-gateway-name: gateway-1 + gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway + name: envoy-gateway/gateway-1 +xdsIR: + envoy-gateway/gateway-1: + accessLog: + text: + - path: /dev/stdout + http: + - address: 0.0.0.0 + hostnames: + - '*' + isHTTP2: false + name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: KeepUnchanged + mergeSlashes: false + port: 10080 + - address: 0.0.0.0 + hostnames: + - '*' + isHTTP2: false + name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: KeepUnchanged + mergeSlashes: false + port: 8080 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml index 447bc183e59..752e0d264cf 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-proxyprotocol.out.yaml @@ -125,10 +125,16 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 - address: 0.0.0.0 hostnames: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8080 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml index 38b6f7764f9..888afc99dc5 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-status-conditions.out.yaml @@ -305,6 +305,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 envoy-gateway/gateway-2: accessLog: @@ -316,4 +319,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-suppress-envoy-headers.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-suppress-envoy-headers.out.yaml index fc3e1cb3727..c68422f5084 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-suppress-envoy-headers.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-suppress-envoy-headers.out.yaml @@ -124,6 +124,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 suppressEnvoyHeaders: true - address: 0.0.0.0 @@ -131,4 +134,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8080 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml index bac7692ded2..cd5fb5a360c 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-tcp-keepalive.out.yaml @@ -153,6 +153,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 tcpKeepalive: idleTime: 1200 @@ -163,5 +166,8 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8080 tcpKeepalive: {} diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml index 08cc82466a2..13154cdb100 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-tls-settings.out.yaml @@ -142,6 +142,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 tls: alpnProtocols: @@ -165,4 +168,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8080 diff --git a/internal/gatewayapi/testdata/disable-accesslog.out.yaml b/internal/gatewayapi/testdata/disable-accesslog.out.yaml index ab2abe87605..3806e4f113e 100644 --- a/internal/gatewayapi/testdata/disable-accesslog.out.yaml +++ b/internal/gatewayapi/testdata/disable-accesslog.out.yaml @@ -124,4 +124,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml index 420cb5c9eb6..1abf6f7b392 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-cross-ns-target.out.yaml @@ -77,4 +77,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml index 1cff7cb4266..bccd6afd479 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind-merge-gateways.out.yaml @@ -88,4 +88,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml index 4cd9f534450..9db1977241c 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-invalid-target-kind.out.yaml @@ -78,4 +78,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml index 6f63d154622..714ecafe2ed 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-valid-merge-gateways.out.yaml @@ -109,4 +109,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml b/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml index 45881aa6d51..0b958297b20 100644 --- a/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml +++ b/internal/gatewayapi/testdata/envoypatchpolicy-valid.out.yaml @@ -99,4 +99,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml index 5d341af90df..8108fe962c9 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml @@ -131,4 +131,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml index 21b77138d0f..1993cfea30d 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json.out.yaml @@ -139,4 +139,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml index cf8256172b5..87e10907af6 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-bad-sinks.out.yaml @@ -132,4 +132,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml index 3e8f35de4bb..ecc7aa7642d 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml @@ -150,4 +150,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml b/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml index 2425ae2fdb9..5b6092a6171 100644 --- a/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-valid.out.yaml @@ -124,4 +124,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml index 758877c9e0f..b772bd943c9 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-extension-filter-invalid-group.out.yaml @@ -114,4 +114,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml index a87e6a37212..8bab973f1e6 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-non-matching-extension-filter.out.yaml @@ -112,4 +112,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml index 26800a6acbd..4f318617bed 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-unsupported-extension-filter.out.yaml @@ -112,4 +112,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml index db4efff096d..bee2d20033d 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml @@ -112,6 +112,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml index 3b17f6e7c6e..93253e5b9dd 100644 --- a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml @@ -101,6 +101,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml index e9b0090faf2..4d0863926db 100644 --- a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-disallowed-httproute.out.yaml @@ -101,4 +101,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml b/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml index dd5d7d5620b..34d5ebda862 100644 --- a/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml +++ b/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml @@ -119,6 +119,9 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-1/https + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml index 27c87736762..7165c0b5780 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml @@ -108,6 +108,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/tls + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml index 2b27bebb156..03bff1ce9d8 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml @@ -177,6 +177,9 @@ xdsIR: - foo.bar.com isHTTP2: false name: envoy-gateway/gateway-1/tls-terminate + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml index 26b0ca7757f..4ed7fc048bf 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml @@ -110,6 +110,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/tls + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml index 8b1afe7953e..c8df40b5660 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml @@ -110,6 +110,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/tls + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml index 985333b628b..3bfd5c50811 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml @@ -107,6 +107,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/tls + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml index 3ef075420ba..da6a4630591 100644 --- a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml @@ -101,6 +101,9 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml index 79d857b5c3d..987cff5897e 100644 --- a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml @@ -107,6 +107,9 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-1/https + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml index 2d5c2595195..450ca22686f 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml @@ -173,6 +173,9 @@ xdsIR: - foo.com isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -216,6 +219,9 @@ xdsIR: - bar.com isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10081 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml index 217d3463f21..28c85b2b592 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml @@ -168,6 +168,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml index bc8aa81e283..15218199088 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml @@ -168,6 +168,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml index 03cb9a9baf4..c7dc5625f0d 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml index a25198f1cdc..c5bf727817f 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml @@ -109,6 +109,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml index fbd024339ff..864dddf6f6b 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml @@ -107,6 +107,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml index 8b2499b681c..879cc4470ce 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml @@ -106,6 +106,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addRequestHeaders: diff --git a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml index 877ba82066b..231851d40de 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml @@ -107,6 +107,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml index cdb43d2b16b..6fe027dc93d 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml @@ -361,6 +361,9 @@ xdsIR: - foo.com isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10081 routes: - backendWeights: @@ -386,6 +389,9 @@ xdsIR: - bar.com isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10082 routes: - backendWeights: @@ -411,6 +417,9 @@ xdsIR: - foo1.com isHTTP2: false name: envoy-gateway/gateway-1/http-3 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10083 routes: - backendWeights: @@ -436,6 +445,9 @@ xdsIR: - bar1.com isHTTP2: false name: envoy-gateway/gateway-1/http-4 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10084 routes: - backendWeights: @@ -461,6 +473,9 @@ xdsIR: - foo2.com isHTTP2: false name: envoy-gateway/gateway-1/http-5 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10085 routes: - backendWeights: @@ -486,6 +501,9 @@ xdsIR: - bar2.com isHTTP2: false name: envoy-gateway/gateway-1/http-6 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10086 routes: - backendWeights: @@ -511,6 +529,9 @@ xdsIR: - foo3.com isHTTP2: false name: envoy-gateway/gateway-1/http-7 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10087 routes: - backendWeights: @@ -536,6 +557,9 @@ xdsIR: - bar3.com isHTTP2: false name: envoy-gateway/gateway-1/http-8 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10088 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml index caf8a4a121d..2e7dfc189f5 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml @@ -312,6 +312,9 @@ xdsIR: - foo.com isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -337,6 +340,9 @@ xdsIR: - bar.com isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -362,6 +368,9 @@ xdsIR: - foo1.com isHTTP2: false name: envoy-gateway/gateway-1/http-3 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -387,6 +396,9 @@ xdsIR: - bar1.com isHTTP2: false name: envoy-gateway/gateway-1/http-4 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -412,6 +424,9 @@ xdsIR: - foo2.com isHTTP2: false name: envoy-gateway/gateway-1/http-5 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -437,6 +452,9 @@ xdsIR: - bar2.com isHTTP2: false name: envoy-gateway/gateway-1/http-6 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -462,6 +480,9 @@ xdsIR: - foo3.com isHTTP2: false name: envoy-gateway/gateway-1/http-7 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -487,6 +508,9 @@ xdsIR: - bar3.com isHTTP2: false name: envoy-gateway/gateway-1/http-8 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml index 1238d457f45..ebaafcee77f 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml @@ -143,6 +143,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -168,6 +171,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/tls + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10443 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml index c4018370899..bfa550205f1 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml @@ -132,6 +132,9 @@ xdsIR: - foo.com isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -157,6 +160,9 @@ xdsIR: - bar.com isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml index d7ef0f4197d..77055214392 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml @@ -101,6 +101,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml index 3e2f4c138e8..affe7bd4a7d 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml index 596cfe065c0..7d6a3662201 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml @@ -134,12 +134,18 @@ xdsIR: - foo.com isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 - address: 0.0.0.0 hostnames: - bar.com isHTTP2: false name: envoy-gateway/gateway-1/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml index 898a1a19d8f..3ec90700af6 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml @@ -109,6 +109,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml index 9df4ede66c1..fb9339aea14 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml @@ -109,6 +109,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml index 2ddf851a9a6..77dca838d87 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml index 26054e9c3ab..7f2664975bc 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-mixed-address-type.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml index 952ec65d2ad..94da4357e7b 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml index 552ff49286c..0eb0237ab30 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml @@ -103,6 +103,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml index 4a2cad5f157..a9dc0004735 100644 --- a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml b/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml index f4ed99409ff..783b3be7b30 100644 --- a/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-not-attaching-to-listener-non-matching-port.out.yaml @@ -104,4 +104,7 @@ xdsIR: - foo.com isHTTP2: false name: envoy-gateway/gateway-1/http-1 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml index ec14fa70323..c25eae8d45e 100644 --- a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml index e92df201ea1..643f69900d0 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml index 7c638338a34..ae4215a6c0f 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml @@ -108,6 +108,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml index 4449d86e2bb..87fbbab63cc 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml @@ -103,6 +103,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml index 49527260c8c..d4210c16826 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml index 97d9cf7ae41..3548d51c01e 100644 --- a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml @@ -100,6 +100,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml index cec6dd60eb3..aae26304aa7 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml @@ -121,6 +121,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addRequestHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml index 76766ba97bd..b8502e6f6d5 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml @@ -131,6 +131,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addRequestHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml index a4618182200..9a5096c8977 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml @@ -117,6 +117,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml index 83790eae99a..6578feab64f 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml @@ -112,6 +112,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml index 46a2a341bcf..7705fdfabae 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml @@ -115,6 +115,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addRequestHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml index 5b50c37e070..c95a7df7e41 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-headers.out.yaml @@ -117,4 +117,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml index 4d032bf384d..949dce73540 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-invalid-headers.out.yaml @@ -118,4 +118,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml index 7d494182f03..7a884c68a64 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml @@ -109,6 +109,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml index 2c98d5a8bf0..6102adbb08e 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-no-valid-headers.out.yaml @@ -113,4 +113,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml index d38366f120c..c477945ad91 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml @@ -113,6 +113,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml index f86ca4126fb..01c173f38ac 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-bad-port.out.yaml @@ -102,6 +102,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml index 7e99626e528..1e074acdf47 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-group.out.yaml @@ -106,6 +106,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml index cd4a321ba90..a7b98493cb2 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-kind.out.yaml @@ -103,6 +103,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml index 930945a3acb..71bde7725ea 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-port.out.yaml @@ -102,6 +102,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml index 89a73d5c2d2..00148a729ab 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.import.out.yaml @@ -104,6 +104,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml index 6115a38a7b8..dc732a9e634 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-no-service.out.yaml @@ -102,6 +102,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml index 272487fb8ec..c5b4a11fc63 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backendref-in-other-namespace.out.yaml @@ -103,6 +103,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml index cb180f9912c..8e676db62f1 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-regex.out.yaml @@ -153,6 +153,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 envoy-gateway/gateway-2: accessLog: @@ -164,4 +167,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10081 diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml index 7111c65a150..83ebeba62da 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml @@ -119,6 +119,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml index db5afcc572e..7c62a1f0c23 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml @@ -131,6 +131,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addRequestHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml index 456f5ae61cc..8437bcb0702 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml @@ -113,6 +113,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml index 1f51e30423d..dd562ce8c9f 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml @@ -113,6 +113,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml index 0f60ad8f2ac..df106f915c6 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml @@ -113,6 +113,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml index b48649d830e..293b36390b1 100644 --- a/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-non-matching-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -105,4 +105,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml index 9118cbf4c27..3947ff48a90 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-full-path-replace-https.out.yaml @@ -114,6 +114,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml index 33a627eacda..aa327a0b959 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-hostname.out.yaml @@ -112,6 +112,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml index d596c3fa908..2491b007b73 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-filter-type.out.yaml @@ -112,4 +112,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml index c0894b31f22..fd69702ae5f 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-scheme.out.yaml @@ -112,4 +112,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml index 59cf37759a1..1a8712b17e1 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-invalid-status.out.yaml @@ -111,4 +111,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml index a76117d542f..c6fe24cbab1 100644 --- a/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-redirect-filter-prefix-replace-with-port-http.out.yaml @@ -115,6 +115,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml index e4ae81b3926..9392479ccea 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml @@ -127,6 +127,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addResponseHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml index c532e037a53..fee2bd21097 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml @@ -121,6 +121,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addResponseHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml index 31ed96e60fb..a91ca6103c4 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml @@ -131,6 +131,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addResponseHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml index ccf876ec377..5ab2a26ae47 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml @@ -117,6 +117,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml index 08584d2172f..2bb71c3ed7e 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml @@ -112,6 +112,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml index abbf39018f3..3752d8e55a0 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml @@ -115,6 +115,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - addResponseHeaders: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml index 48f8290b7e9..50fe9f29aed 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-headers.out.yaml @@ -117,4 +117,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml index c19dbdc3785..bb974df71b8 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-invalid-headers.out.yaml @@ -118,4 +118,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml index c3f20ed8458..23dc715f356 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml @@ -109,6 +109,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml index ff8e86749df..e3c8a6dbec0 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-valid-headers.out.yaml @@ -113,4 +113,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml index 370712249ad..04fde189169 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml @@ -113,6 +113,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml index ce04fdda2da..45c81d7d396 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml @@ -102,6 +102,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml index 90402611e90..bf140ce157c 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml @@ -100,6 +100,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml index 15600686c5b..6cdc1ed6c56 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml @@ -128,4 +128,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml index 252606868c5..00156188b42 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml @@ -106,6 +106,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml index 04bfb5355ca..0f7128fea24 100644 --- a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml @@ -106,6 +106,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml index e32a8e88570..42931795df8 100644 --- a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -104,6 +104,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml index daf7f4d554b..b3920b0478a 100644 --- a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -105,6 +105,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml index 3be41de0cfe..39989471f38 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml @@ -112,6 +112,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml index 257403815b9..7e1364ae96e 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml @@ -113,6 +113,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml index be9e854d3ee..2209165a18f 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml @@ -110,6 +110,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml index d143f816d20..bfbe2d70d28 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml @@ -110,6 +110,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml index 4af607bd485..448b7518fc0 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-hostname.out.yaml @@ -116,4 +116,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml index 6432ac37521..cac49f264af 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-multiple-filters.out.yaml @@ -118,4 +118,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml index e87b31e0bb6..a8e83b7761e 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path-type.out.yaml @@ -114,4 +114,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml index 7cf51a828d2..9633fa077b5 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-path.out.yaml @@ -113,4 +113,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml index d2bd375227a..7ff23ecae5d 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-missing-path.out.yaml @@ -111,4 +111,7 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml index 8a7236c76e6..c23a593b95b 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml @@ -112,6 +112,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml index 247894b7b22..0570ee57378 100644 --- a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml @@ -103,6 +103,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml index c7c2e42866a..6a2feea08a3 100644 --- a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml @@ -288,6 +288,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml b/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml index 5ae98fa1c2c..8e65705fc44 100644 --- a/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml +++ b/internal/gatewayapi/testdata/merge-invalid-multiple-gateways.out.yaml @@ -141,4 +141,7 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml index 311c65496de..e3c17952320 100644 --- a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml +++ b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml @@ -228,6 +228,9 @@ xdsIR: - '*.envoyproxy.io' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -253,12 +256,18 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8888 - address: 0.0.0.0 hostnames: - example.com isHTTP2: false name: envoy-gateway/gateway-2/http-3 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8888 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml b/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml index 25ed1fd3c3d..1346f408115 100644 --- a/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml +++ b/internal/gatewayapi/testdata/merge-valid-multiple-gateways.out.yaml @@ -150,16 +150,25 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 - address: 0.0.0.0 hostnames: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http-2 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8888 - address: 0.0.0.0 hostnames: - example.com isHTTP2: false name: envoy-gateway/gateway-2/http-3 + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 8888 diff --git a/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml index 4bf52bd4177..d4471cd24f3 100644 --- a/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-status-conditions.out.yaml @@ -349,6 +349,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -372,6 +375,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml index 89fdd8f8677..96c93cd3e93 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml @@ -130,6 +130,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml index a0878e64870..0de22c6369b 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml @@ -261,6 +261,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -305,6 +308,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml index 0af09853aab..367f2d30acf 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml @@ -220,6 +220,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml index addc70ab602..6cf96952e41 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml @@ -267,6 +267,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -313,6 +316,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml index 18ce17f5d26..c7e397cc54c 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml @@ -264,6 +264,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: @@ -310,6 +313,9 @@ xdsIR: - '*' isHTTP2: false name: envoy-gateway/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml index 14e0c27ca1e..29fb726b11b 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-issuer.out.yaml @@ -94,4 +94,7 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml index daec348c156..078fbd343ad 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc-invalid-secretref.out.yaml @@ -263,6 +263,9 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 default/gateway-2: accessLog: @@ -274,6 +277,9 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-2/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 default/gateway-3: accessLog: @@ -285,4 +291,7 @@ xdsIR: - '*' isHTTP2: false name: default/gateway-3/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml index 57b031b3e3f..01dfc18a280 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml @@ -267,6 +267,9 @@ xdsIR: - '*' isHTTP2: true name: envoy-gateway/gateway-1/http + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 routes: - backendWeights: diff --git a/internal/ir/xds.go b/internal/ir/xds.go index 94e713a4619..4db4c43028b 100644 --- a/internal/ir/xds.go +++ b/internal/ir/xds.go @@ -207,6 +207,8 @@ type HTTPListener struct { // HTTP3 provides HTTP/3 configuration on the listener. // +optional HTTP3 *HTTP3Settings `json:"http3,omitempty"` + // Path contains settings for path URI manipulations + Path PathSettings `json:"path,omitempty"` } // Validate the fields within the HTTPListener structure @@ -309,6 +311,22 @@ func (t TLSConfig) Validate() error { return errs } +type PathEscapedSlashAction egv1a1.PathEscapedSlashAction + +const ( + KeepUnchangedAction = PathEscapedSlashAction(egv1a1.KeepUnchangedAction) + RejectRequestAction = PathEscapedSlashAction(egv1a1.RejectRequestAction) + UnescapeAndRedirect = PathEscapedSlashAction(egv1a1.UnescapeAndRedirect) + UnescapeAndForward = PathEscapedSlashAction(egv1a1.UnescapeAndForward) +) + +// PathSettings holds configuration for path URI manipulations +// +k8s:deepcopy-gen=true +type PathSettings struct { + MergeSlashes bool `json:"mergeSlashes" yaml:"mergeSlashes"` + EscapedSlashesAction PathEscapedSlashAction `json:"escapedSlashesAction" yaml:"escapedSlashesAction"` +} + // BackendWeights stores the weights of valid and invalid backends for the route so that 500 error responses can be returned in the same proportions type BackendWeights struct { Valid uint32 `json:"valid" yaml:"valid"` diff --git a/internal/ir/zz_generated.deepcopy.go b/internal/ir/zz_generated.deepcopy.go index 09b0db10476..e905756dbc2 100644 --- a/internal/ir/zz_generated.deepcopy.go +++ b/internal/ir/zz_generated.deepcopy.go @@ -481,6 +481,7 @@ func (in *HTTPListener) DeepCopyInto(out *HTTPListener) { *out = new(HTTP3Settings) **out = **in } + out.Path = in.Path } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPListener. @@ -1045,6 +1046,21 @@ func (in *OpenTelemetryAccessLog) DeepCopy() *OpenTelemetryAccessLog { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PathSettings) DeepCopyInto(out *PathSettings) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PathSettings. +func (in *PathSettings) DeepCopy() *PathSettings { + if in == nil { + return nil + } + out := new(PathSettings) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxyInfra) DeepCopyInto(out *ProxyInfra) { *out = *in diff --git a/internal/xds/translator/listener.go b/internal/xds/translator/listener.go index 704fe52ce83..02a9cc5810a 100644 --- a/internal/xds/translator/listener.go +++ b/internal/xds/translator/listener.go @@ -136,10 +136,9 @@ func (t *Translator) addXdsHTTPFilterChain(xdsListener *listenerv3.Listener, irL // https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers#x-forwarded-for UseRemoteAddress: &wrappers.BoolValue{Value: true}, // normalize paths according to RFC 3986 - NormalizePath: &wrapperspb.BoolValue{Value: true}, - // merge adjacent slashes in the path - MergeSlashes: true, - PathWithEscapedSlashesAction: hcmv3.HttpConnectionManager_UNESCAPE_AND_REDIRECT, + NormalizePath: &wrapperspb.BoolValue{Value: true}, + MergeSlashes: irListener.Path.MergeSlashes, + PathWithEscapedSlashesAction: translateEscapePath(irListener.Path.EscapedSlashesAction), CommonHttpProtocolOptions: &corev3.HttpProtocolOptions{ HeadersWithUnderscoresAction: corev3.HttpProtocolOptions_REJECT_REQUEST, }, @@ -539,3 +538,17 @@ func makeConfigSource() *corev3.ConfigSource { } return source } + +func translateEscapePath(in ir.PathEscapedSlashAction) hcmv3.HttpConnectionManager_PathWithEscapedSlashesAction { + + lookup := map[ir.PathEscapedSlashAction]hcmv3.HttpConnectionManager_PathWithEscapedSlashesAction{ + ir.KeepUnchangedAction: hcmv3.HttpConnectionManager_KEEP_UNCHANGED, + ir.RejectRequestAction: hcmv3.HttpConnectionManager_REJECT_REQUEST, + ir.UnescapeAndRedirect: hcmv3.HttpConnectionManager_UNESCAPE_AND_REDIRECT, + ir.UnescapeAndForward: hcmv3.HttpConnectionManager_UNESCAPE_AND_FORWARD, + } + if r, found := lookup[in]; found { + return r + } + return hcmv3.HttpConnectionManager_IMPLEMENTATION_SPECIFIC_DEFAULT +} diff --git a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-filter.yaml b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-filter.yaml index 0164a4ddee4..a9eeafbc4bb 100644 --- a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-filter.yaml +++ b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-filter.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-listener-error.yaml b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-listener-error.yaml index 22b31a0ad8b..36e4678f7c8 100644 --- a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-listener-error.yaml +++ b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-listener-error.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-route-error.yaml b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-route-error.yaml index 7db70007a9e..2bf210f4fde 100644 --- a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-route-error.yaml +++ b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-route-error.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "extension-post-xdsroute-hook-error" hostname: "*" diff --git a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-virtualhost-error.yaml b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-virtualhost-error.yaml index 2da86a336dc..2a6cab1754a 100644 --- a/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-virtualhost-error.yaml +++ b/internal/xds/translator/testdata/in/extension-xds-ir/http-route-extension-virtualhost-error.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/extension-xds-ir/http-route.yaml b/internal/xds/translator/testdata/in/extension-xds-ir/http-route.yaml index 43aec9d1ea7..0c89d5a1840 100644 --- a/internal/xds/translator/testdata/in/extension-xds-ir/http-route.yaml +++ b/internal/xds/translator/testdata/in/extension-xds-ir/http-route.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/ratelimit-config/distinct-match.yaml b/internal/xds/translator/testdata/in/ratelimit-config/distinct-match.yaml index c742dfc7387..0f3f9749672 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/distinct-match.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/distinct-match.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/distinct-remote-address-match.yaml b/internal/xds/translator/testdata/in/ratelimit-config/distinct-remote-address-match.yaml index 136983f0b85..7ff820e7b8f 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/distinct-remote-address-match.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/distinct-remote-address-match.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/empty-header-matches.yaml b/internal/xds/translator/testdata/in/ratelimit-config/empty-header-matches.yaml index 49f625800d5..ca13b2132b9 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/empty-header-matches.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/empty-header-matches.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/masked-remote-address-match.yaml b/internal/xds/translator/testdata/in/ratelimit-config/masked-remote-address-match.yaml index 34883f1d33b..70531d48a82 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/masked-remote-address-match.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/masked-remote-address-match.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/multiple-masked-remote-address-match-with-same-cidr.yaml b/internal/xds/translator/testdata/in/ratelimit-config/multiple-masked-remote-address-match-with-same-cidr.yaml index 1d5b48cc84c..32792f005b4 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/multiple-masked-remote-address-match-with-same-cidr.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/multiple-masked-remote-address-match-with-same-cidr.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/multiple-matches.yaml b/internal/xds/translator/testdata/in/ratelimit-config/multiple-matches.yaml index cd65dde7274..67de62abbda 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/multiple-matches.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/multiple-matches.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/multiple-routes.yaml b/internal/xds/translator/testdata/in/ratelimit-config/multiple-routes.yaml index dff823cfcc5..c5a768c9b01 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/multiple-routes.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/multiple-routes.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/multiple-rules.yaml b/internal/xds/translator/testdata/in/ratelimit-config/multiple-rules.yaml index 3c807f4d466..ef9b8d22885 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/multiple-rules.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/multiple-rules.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/ratelimit-config/value-match.yaml b/internal/xds/translator/testdata/in/ratelimit-config/value-match.yaml index d45401e5c74..8fc933e923a 100644 --- a/internal/xds/translator/testdata/in/ratelimit-config/value-match.yaml +++ b/internal/xds/translator/testdata/in/ratelimit-config/value-match.yaml @@ -3,6 +3,9 @@ address: "0.0.0.0" port: 10080 hostnames: - "*" +path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" rateLimit: diff --git a/internal/xds/translator/testdata/in/xds-ir/accesslog-invalid.yaml b/internal/xds/translator/testdata/in/xds-ir/accesslog-invalid.yaml index 53883a39a2f..37ce0958e73 100644 --- a/internal/xds/translator/testdata/in/xds-ir/accesslog-invalid.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/accesslog-invalid.yaml @@ -27,6 +27,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "direct-route" destination: diff --git a/internal/xds/translator/testdata/in/xds-ir/accesslog.yaml b/internal/xds/translator/testdata/in/xds-ir/accesslog.yaml index 4aa0ac3b216..f4ec43ac072 100644 --- a/internal/xds/translator/testdata/in/xds-ir/accesslog.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/accesslog.yaml @@ -27,6 +27,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "direct-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/basic-auth.yaml b/internal/xds/translator/testdata/in/xds-ir/basic-auth.yaml index 2e05dcb6c4c..af6baa0b77e 100644 --- a/internal/xds/translator/testdata/in/xds-ir/basic-auth.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/basic-auth.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/circuit-breaker.yaml b/internal/xds/translator/testdata/in/xds-ir/circuit-breaker.yaml index bd61285403d..caf0d373f89 100644 --- a/internal/xds/translator/testdata/in/xds-ir/circuit-breaker.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/circuit-breaker.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/cors.yaml b/internal/xds/translator/testdata/in/xds-ir/cors.yaml index d7af9c71192..c5a07bee840 100644 --- a/internal/xds/translator/testdata/in/xds-ir/cors.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/cors.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/fault-injection.yaml b/internal/xds/translator/testdata/in/xds-ir/fault-injection.yaml index 5e291de81f5..a99b77d5e00 100644 --- a/internal/xds/translator/testdata/in/xds-ir/fault-injection.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/fault-injection.yaml @@ -2,6 +2,9 @@ http: - name: "first-listener" address: "0.0.0.0" port: 10080 + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect hostnames: - "*" routes: diff --git a/internal/xds/translator/testdata/in/xds-ir/health-check.yaml b/internal/xds/translator/testdata/in/xds-ir/health-check.yaml index 6fe80abc608..63fc5d6f43d 100644 --- a/internal/xds/translator/testdata/in/xds-ir/health-check.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/health-check.yaml @@ -1,6 +1,9 @@ http: - name: "first-listener" address: "0.0.0.0" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect port: 10080 hostnames: - "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-direct-response.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-direct-response.yaml index cb7af714fa7..9db15c7fb9d 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-direct-response.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-direct-response.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "direct-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-dns-cluster.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-dns-cluster.yaml index 990d883f8d8..1cb0be3ec26 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-dns-cluster.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-dns-cluster.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-invalid.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-invalid.yaml index 9d16c7298fe..42184d40476 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-invalid.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-invalid.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-mirror.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-mirror.yaml index ca7558a6cd9..b00449b384f 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-mirror.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-mirror.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "mirror-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-matches.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-matches.yaml index a92c856faff..81fc7da1080 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-matches.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-matches.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - destination: name: "first-route-dest" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-mirrors.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-mirrors.yaml index 7eaabf815f1..3d13de381be 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-mirrors.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-multiple-mirrors.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "mirror-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-partial-invalid.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-partial-invalid.yaml index 887408511b7..d72ec1d2c68 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-partial-invalid.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-partial-invalid.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "valid-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-redirect.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-redirect.yaml index 9081d4fc22a..1aadcbb76c7 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-redirect.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-redirect.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "redirect-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-regex.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-regex.yaml index 8eb85fa1fb6..d9558ad99a2 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-regex.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-regex.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "regex-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-request-headers.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-request-headers.yaml index 9f2bf5c5419..c3dc4417dcc 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-request-headers.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-request-headers.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "request-header-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-headers.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-headers.yaml index b6bc34b5af5..e3114e2d252 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-headers.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-headers.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "response-header-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-remove-headers.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-remove-headers.yaml index 67d9d868723..0e59f8f124d 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-remove-headers.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-response-add-remove-headers.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "response-header-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-response-remove-headers.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-response-remove-headers.yaml index 10222ef07df..f7b30b3d7d6 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-response-remove-headers.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-response-remove-headers.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "response-header-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-root-path-url-prefix.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-root-path-url-prefix.yaml index 893674ba08e..f4307644514 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-root-path-url-prefix.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-root-path-url-prefix.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "rewrite-route" pathMatch: diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-fullpath.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-fullpath.yaml index b47fd370d01..4d08acb93ee 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-fullpath.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-fullpath.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "rewrite-route" pathMatch: diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-host.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-host.yaml index 49818d6c849..8cc673a7e5b 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-host.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-host.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "rewrite-route" pathMatch: diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-prefix.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-prefix.yaml index c39ea68d167..df4f2e9c2bf 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-prefix.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-rewrite-url-prefix.yaml @@ -5,6 +5,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "rewrite-route" pathMatch: diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-timeout.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-timeout.yaml index 49392abb0e3..355f07279d4 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-timeout.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-timeout.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-backend.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-backend.yaml index 38227bc91ab..2540dec625a 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-backend.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-backend.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-invalid-backend.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-invalid-backend.yaml index 5fa0bc33bb2..4419c5222e1 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-invalid-backend.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-weighted-invalid-backend.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route.yaml index 43aec9d1ea7..0c89d5a1840 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml b/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml index 2a61570f0ec..f3dc12c5aae 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml @@ -5,6 +5,9 @@ http: hostnames: - "*" isHTTP2: true + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/http3.yaml b/internal/xds/translator/testdata/in/xds-ir/http3.yaml index bd5f1a69743..8e23441fef4 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http3.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http3.yaml @@ -6,6 +6,9 @@ http: isHTTP2: false name: envoy-gateway/gateway-1/tls port: 10443 + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - backendWeights: invalid: 0 diff --git a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-listener.yaml b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-listener.yaml index 166edbee6b8..6099f5dabaf 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-listener.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-listener.yaml @@ -56,6 +56,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-patch.yaml b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-patch.yaml index 1cb5d100915..661bc3897fc 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-patch.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid-patch.yaml @@ -26,6 +26,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid.yaml b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid.yaml index 4c04333d85a..ef60319193c 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-invalid.yaml @@ -60,6 +60,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-missing-resource.yaml b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-missing-resource.yaml index 2ae43310e76..c285e244167 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jsonpatch-missing-resource.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jsonpatch-missing-resource.yaml @@ -26,6 +26,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jsonpatch.yaml b/internal/xds/translator/testdata/in/xds-ir/jsonpatch.yaml index 3e09512c6ed..1fc1a5f3a66 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jsonpatch.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jsonpatch.yaml @@ -60,6 +60,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jwt-custom-extractor.yaml b/internal/xds/translator/testdata/in/xds-ir/jwt-custom-extractor.yaml index f8a56289c65..2104396d666 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jwt-custom-extractor.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jwt-custom-extractor.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-multi-provider.yaml b/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-multi-provider.yaml index 91b17b0f7be..e3337f261ee 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-multi-provider.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-multi-provider.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route-www.test.com" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-single-provider.yaml b/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-single-provider.yaml index d9699c052f9..7dd2a4b73c2 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-single-provider.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jwt-multi-route-single-provider.yaml @@ -7,6 +7,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jwt-ratelimit.yaml b/internal/xds/translator/testdata/in/xds-ir/jwt-ratelimit.yaml index f4b24fe3525..9857cb58da2 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jwt-ratelimit.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jwt-ratelimit.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/jwt-single-route-single-match.yaml b/internal/xds/translator/testdata/in/xds-ir/jwt-single-route-single-match.yaml index cb7b0a20946..4ff905bdc5d 100644 --- a/internal/xds/translator/testdata/in/xds-ir/jwt-single-route-single-match.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/jwt-single-route-single-match.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/listener-proxy-protocol.yaml b/internal/xds/translator/testdata/in/xds-ir/listener-proxy-protocol.yaml index d59dbf1d7a3..245099796d8 100644 --- a/internal/xds/translator/testdata/in/xds-ir/listener-proxy-protocol.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/listener-proxy-protocol.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "foo.com" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect tls: alpnProtocols: - h2 diff --git a/internal/xds/translator/testdata/in/xds-ir/listener-tcp-keepalive.yaml b/internal/xds/translator/testdata/in/xds-ir/listener-tcp-keepalive.yaml index 35905935a44..1e4cdcdc5dd 100644 --- a/internal/xds/translator/testdata/in/xds-ir/listener-tcp-keepalive.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/listener-tcp-keepalive.yaml @@ -5,6 +5,9 @@ http: hostnames: - "foo.com" tcpKeepalive: {} + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" @@ -23,6 +26,9 @@ http: probes: 7 interval: 200 idleTime: 50 + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "second-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/load-balancer.yaml b/internal/xds/translator/testdata/in/xds-ir/load-balancer.yaml index 91ba5b18971..fbf13ae8865 100644 --- a/internal/xds/translator/testdata/in/xds-ir/load-balancer.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/load-balancer.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/local-ratelimit.yaml b/internal/xds/translator/testdata/in/xds-ir/local-ratelimit.yaml index ee136965b95..9e818b4d150 100644 --- a/internal/xds/translator/testdata/in/xds-ir/local-ratelimit.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/local-ratelimit.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route-ratelimit-single-rule" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/metrics-virtual-host.yaml b/internal/xds/translator/testdata/in/xds-ir/metrics-virtual-host.yaml index b1441eee3e0..39f1a23dc7f 100644 --- a/internal/xds/translator/testdata/in/xds-ir/metrics-virtual-host.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/metrics-virtual-host.yaml @@ -7,6 +7,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/mixed-tls-jwt-authn.yaml b/internal/xds/translator/testdata/in/xds-ir/mixed-tls-jwt-authn.yaml index 158f3240e22..36984ea69f6 100644 --- a/internal/xds/translator/testdata/in/xds-ir/mixed-tls-jwt-authn.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/mixed-tls-jwt-authn.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect tls: - name: first-listener # byte slice representation of "cert-data" diff --git a/internal/xds/translator/testdata/in/xds-ir/multiple-listeners-same-port.yaml b/internal/xds/translator/testdata/in/xds-ir/multiple-listeners-same-port.yaml index fd01a2eb7de..fccf73d51fb 100644 --- a/internal/xds/translator/testdata/in/xds-ir/multiple-listeners-same-port.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/multiple-listeners-same-port.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "foo.com" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect tls: alpnProtocols: - h2 @@ -28,6 +31,9 @@ http: port: 10080 hostnames: - "foo.net" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect tls: alpnProtocols: - h2 @@ -52,6 +58,9 @@ http: port: 10080 hostnames: - "example.com" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "third-route" hostname: "*" @@ -66,6 +75,9 @@ http: port: 10080 hostnames: - "example.net" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "fourth-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/oidc.yaml b/internal/xds/translator/testdata/in/xds-ir/oidc.yaml index efbd8b9ea69..8593b3dced4 100644 --- a/internal/xds/translator/testdata/in/xds-ir/oidc.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/oidc.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/path-settings.yaml b/internal/xds/translator/testdata/in/xds-ir/path-settings.yaml new file mode 100644 index 00000000000..1eddbaab253 --- /dev/null +++ b/internal/xds/translator/testdata/in/xds-ir/path-settings.yaml @@ -0,0 +1,18 @@ +http: +- name: "first-listener" + address: "0.0.0.0" + port: 10080 + hostnames: + - "*" + path: + mergeSlashes: false + escapedSlashesAction: UnescapeAndForward + routes: + - name: "first-route" + hostname: "*" + destination: + name: "first-route-dest" + settings: + - endpoints: + - host: "1.2.3.4" + port: 50000 diff --git a/internal/xds/translator/testdata/in/xds-ir/proxy-protocol-upstream.yaml b/internal/xds/translator/testdata/in/xds-ir/proxy-protocol-upstream.yaml index cfe35f7fd0b..adf21ca8fd5 100644 --- a/internal/xds/translator/testdata/in/xds-ir/proxy-protocol-upstream.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/proxy-protocol-upstream.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/ratelimit-custom-domain.yaml b/internal/xds/translator/testdata/in/xds-ir/ratelimit-custom-domain.yaml index 9a0671ad4ad..8d9c2f5b41e 100644 --- a/internal/xds/translator/testdata/in/xds-ir/ratelimit-custom-domain.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/ratelimit-custom-domain.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/ratelimit-sourceip.yaml b/internal/xds/translator/testdata/in/xds-ir/ratelimit-sourceip.yaml index 7acb4a7cd0d..69b3480fca8 100644 --- a/internal/xds/translator/testdata/in/xds-ir/ratelimit-sourceip.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/ratelimit-sourceip.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/ratelimit.yaml b/internal/xds/translator/testdata/in/xds-ir/ratelimit.yaml index 9a0671ad4ad..8d9c2f5b41e 100644 --- a/internal/xds/translator/testdata/in/xds-ir/ratelimit.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/ratelimit.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "first-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/simple-tls.yaml b/internal/xds/translator/testdata/in/xds-ir/simple-tls.yaml index 77626c96b8e..7309020334a 100644 --- a/internal/xds/translator/testdata/in/xds-ir/simple-tls.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/simple-tls.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect tls: alpnProtocols: - h2 diff --git a/internal/xds/translator/testdata/in/xds-ir/suppress-envoy-headers.yaml b/internal/xds/translator/testdata/in/xds-ir/suppress-envoy-headers.yaml index 98dcd6392cd..9eaf2996e88 100644 --- a/internal/xds/translator/testdata/in/xds-ir/suppress-envoy-headers.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/suppress-envoy-headers.yaml @@ -4,6 +4,9 @@ http: port: 10080 hostnames: - "foo.com" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect tls: alpnProtocols: - h2 diff --git a/internal/xds/translator/testdata/in/xds-ir/tls-with-ciphers-versions-alpn.yaml b/internal/xds/translator/testdata/in/xds-ir/tls-with-ciphers-versions-alpn.yaml index cddf0a052d0..c2dcb03028b 100644 --- a/internal/xds/translator/testdata/in/xds-ir/tls-with-ciphers-versions-alpn.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/tls-with-ciphers-versions-alpn.yaml @@ -1,6 +1,9 @@ http: - name: "first-listener" address: "0.0.0.0" + path: + escapedSlashesAction: UnescapeAndRedirect + mergeSlashes: true port: 10080 hostnames: - "foo.com" diff --git a/internal/xds/translator/testdata/in/xds-ir/tracing-invalid.yaml b/internal/xds/translator/testdata/in/xds-ir/tracing-invalid.yaml index f56127bb6d7..d8b23c5d21e 100644 --- a/internal/xds/translator/testdata/in/xds-ir/tracing-invalid.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/tracing-invalid.yaml @@ -26,6 +26,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "direct-route" hostname: "*" diff --git a/internal/xds/translator/testdata/in/xds-ir/tracing.yaml b/internal/xds/translator/testdata/in/xds-ir/tracing.yaml index 1961a714477..d67ab2d015f 100644 --- a/internal/xds/translator/testdata/in/xds-ir/tracing.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/tracing.yaml @@ -26,6 +26,9 @@ http: port: 10080 hostnames: - "*" + path: + mergeSlashes: true + escapedSlashesAction: UnescapeAndRedirect routes: - name: "direct-route" hostname: "*" diff --git a/internal/xds/translator/testdata/out/xds-ir/path-settings.clusters.yaml b/internal/xds/translator/testdata/out/xds-ir/path-settings.clusters.yaml new file mode 100644 index 00000000000..c8692b81602 --- /dev/null +++ b/internal/xds/translator/testdata/out/xds-ir/path-settings.clusters.yaml @@ -0,0 +1,14 @@ +- commonLbConfig: + localityWeightedLbConfig: {} + connectTimeout: 10s + dnsLookupFamily: V4_ONLY + edsClusterConfig: + edsConfig: + ads: {} + resourceApiVersion: V3 + serviceName: first-route-dest + lbPolicy: LEAST_REQUEST + name: first-route-dest + outlierDetection: {} + perConnectionBufferLimitBytes: 32768 + type: EDS diff --git a/internal/xds/translator/testdata/out/xds-ir/path-settings.endpoints.yaml b/internal/xds/translator/testdata/out/xds-ir/path-settings.endpoints.yaml new file mode 100644 index 00000000000..3b3f2d09076 --- /dev/null +++ b/internal/xds/translator/testdata/out/xds-ir/path-settings.endpoints.yaml @@ -0,0 +1,12 @@ +- clusterName: first-route-dest + endpoints: + - lbEndpoints: + - endpoint: + address: + socketAddress: + address: 1.2.3.4 + portValue: 50000 + loadBalancingWeight: 1 + loadBalancingWeight: 1 + locality: + region: first-route-dest/backend/0 diff --git a/internal/xds/translator/testdata/out/xds-ir/path-settings.listeners.yaml b/internal/xds/translator/testdata/out/xds-ir/path-settings.listeners.yaml new file mode 100644 index 00000000000..c2a3253485a --- /dev/null +++ b/internal/xds/translator/testdata/out/xds-ir/path-settings.listeners.yaml @@ -0,0 +1,32 @@ +- address: + socketAddress: + address: 0.0.0.0 + portValue: 10080 + defaultFilterChain: + filters: + - name: envoy.filters.network.http_connection_manager + typedConfig: + '@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + commonHttpProtocolOptions: + headersWithUnderscoresAction: REJECT_REQUEST + http2ProtocolOptions: + initialConnectionWindowSize: 1048576 + initialStreamWindowSize: 65536 + maxConcurrentStreams: 100 + httpFilters: + - name: envoy.filters.http.router + typedConfig: + '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + normalizePath: true + pathWithEscapedSlashesAction: UNESCAPE_AND_FORWARD + rds: + configSource: + ads: {} + resourceApiVersion: V3 + routeConfigName: first-listener + statPrefix: http + upgradeConfigs: + - upgradeType: websocket + useRemoteAddress: true + name: first-listener + perConnectionBufferLimitBytes: 32768 diff --git a/internal/xds/translator/testdata/out/xds-ir/path-settings.routes.yaml b/internal/xds/translator/testdata/out/xds-ir/path-settings.routes.yaml new file mode 100644 index 00000000000..2734c7cc42a --- /dev/null +++ b/internal/xds/translator/testdata/out/xds-ir/path-settings.routes.yaml @@ -0,0 +1,12 @@ +- ignorePortInHostMatching: true + name: first-listener + virtualHosts: + - domains: + - '*' + name: first-listener/* + routes: + - match: + prefix: / + name: first-route + route: + cluster: first-route-dest diff --git a/internal/xds/translator/translator_test.go b/internal/xds/translator/translator_test.go index 1f6160c944b..e319f876e8a 100644 --- a/internal/xds/translator/translator_test.go +++ b/internal/xds/translator/translator_test.go @@ -233,6 +233,9 @@ func TestTranslateXds(t *testing.T) { { name: "tls-with-ciphers-versions-alpn", }, + { + name: "path-settings", + }, } for _, tc := range testCases {