@@ -1872,8 +1872,8 @@ func TestRouteMatch(t *testing.T) {
18721872 InvertMatch : false ,
18731873 HeaderMatchSpecifier : & envoy_route_v3.HeaderMatcher_StringMatch {
18741874 StringMatch : & matcher.StringMatcher {
1875- MatchPattern : & matcher.StringMatcher_SafeRegex {
1876- SafeRegex : SafeRegexMatch ( ".* 11-22-33-44.*" ) ,
1875+ MatchPattern : & matcher.StringMatcher_Contains {
1876+ Contains : " 11-22-33-44" ,
18771877 },
18781878 },
18791879 },
@@ -1895,8 +1895,8 @@ func TestRouteMatch(t *testing.T) {
18951895 InvertMatch : false ,
18961896 HeaderMatchSpecifier : & envoy_route_v3.HeaderMatcher_StringMatch {
18971897 StringMatch : & matcher.StringMatcher {
1898- MatchPattern : & matcher.StringMatcher_SafeRegex {
1899- SafeRegex : SafeRegexMatch ( ".*11 \\ .22\\ .33\\ .44.*" ) ,
1898+ MatchPattern : & matcher.StringMatcher_Contains {
1899+ Contains : "11 .22.33.44" ,
19001900 },
19011901 },
19021902 },
@@ -1918,8 +1918,8 @@ func TestRouteMatch(t *testing.T) {
19181918 InvertMatch : false ,
19191919 HeaderMatchSpecifier : & envoy_route_v3.HeaderMatcher_StringMatch {
19201920 StringMatch : & matcher.StringMatcher {
1921- MatchPattern : & matcher.StringMatcher_SafeRegex {
1922- SafeRegex : SafeRegexMatch ( ".*11 \\ . \\ [22\\ ] \\ . \\ *33\\ .44.*" ) ,
1921+ MatchPattern : & matcher.StringMatcher_Contains {
1922+ Contains : "11. [22]. *33.44" ,
19231923 },
19241924 },
19251925 },
@@ -2141,8 +2141,8 @@ func TestRouteMatch(t *testing.T) {
21412141 Name : "x-header-foo" ,
21422142 HeaderMatchSpecifier : & envoy_route_v3.HeaderMatcher_StringMatch {
21432143 StringMatch : & matcher.StringMatcher {
2144- MatchPattern : & matcher.StringMatcher_SafeRegex {
2145- SafeRegex : SafeRegexMatch ( ".* bar.*" ) ,
2144+ MatchPattern : & matcher.StringMatcher_Contains {
2145+ Contains : " bar" ,
21462146 },
21472147 },
21482148 },
@@ -2163,8 +2163,9 @@ func TestRouteMatch(t *testing.T) {
21632163 Name : "x-header-foo" ,
21642164 HeaderMatchSpecifier : & envoy_route_v3.HeaderMatcher_StringMatch {
21652165 StringMatch : & matcher.StringMatcher {
2166- MatchPattern : & matcher.StringMatcher_SafeRegex {
2167- SafeRegex : SafeRegexMatch ("(?i).*bar.*" ),
2166+ IgnoreCase : true ,
2167+ MatchPattern : & matcher.StringMatcher_Contains {
2168+ Contains : "bar" ,
21682169 },
21692170 },
21702171 },
0 commit comments