Support RegularExpression for path matching
This commit is contained in:
parent
0e215f9b61
commit
6e61fe0de1
4 changed files with 30 additions and 1 deletions
|
@ -1894,6 +1894,8 @@ func extractRule(routeRule gatev1.HTTPRouteRule, hostRule string) (string, error
|
|||
matchRules = append(matchRules, fmt.Sprintf("Path(`%s`)", *match.Path.Value))
|
||||
case gatev1.PathMatchPathPrefix:
|
||||
matchRules = append(matchRules, buildPathMatchPathPrefixRule(*match.Path.Value))
|
||||
case gatev1.PathMatchRegularExpression:
|
||||
matchRules = append(matchRules, fmt.Sprintf("PathRegexp(`%s`)", *match.Path.Value))
|
||||
default:
|
||||
return "", fmt.Errorf("unsupported path match type %s", *match.Path.Type)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue