File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 - group : gateway.envoyproxy.io
3535 kind : Backend
3636 name : backend-fqdn
37+ - matches :
38+ - path :
39+ type : PathPrefix
40+ value : /path-regex
41+ filters :
42+ - type : ExtensionRef
43+ extensionRef :
44+ group : gateway.envoyproxy.io
45+ kind : HTTPRouteFilter
46+ name : path-regex-host-rewrite
47+ backendRefs :
48+ - name : infra-backend-v1
49+ port : 8080
3750---
3851apiVersion : gateway.envoyproxy.io/v1alpha1
3952kind : HTTPRouteFilter
5770 type : Backend
5871---
5972apiVersion : gateway.envoyproxy.io/v1alpha1
73+ kind : HTTPRouteFilter
74+ metadata :
75+ name : path-regex-host-rewrite
76+ namespace : gateway-conformance-infra
77+ spec :
78+ urlRewrite :
79+ hostname :
80+ type : PathRegex
81+ pathRegex :
82+ pattern : " ^/path-regex/([^/]+).*"
83+ substitution : " \\ 1.gateway-conformance-infra.svc.cluster.local"
84+ ---
85+ apiVersion : gateway.envoyproxy.io/v1alpha1
6086kind : Backend
6187metadata :
6288 name : backend-fqdn
Original file line number Diff line number Diff line change @@ -62,6 +62,19 @@ var HTTPRouteRewriteHostHeader = suite.ConformanceTest{
6262 Backend : "infra-backend-v1" ,
6363 Namespace : ns ,
6464 },
65+ {
66+ Request : http.Request {
67+ Path : "/path-regex/infra-backend-v1" ,
68+ },
69+ ExpectedRequest : & http.ExpectedRequest {
70+ Request : http.Request {
71+ Path : "/path-regex/infra-backend-v1" ,
72+ Host : "infra-backend-v1.gateway-conformance-infra.svc.cluster.local" ,
73+ },
74+ },
75+ Backend : "infra-backend-v1" ,
76+ Namespace : ns ,
77+ },
6578 }
6679 for i := range testCases {
6780 // Declare tc here to avoid loop variable
You can’t perform that action at this time.
0 commit comments