HTTPProxy wildcard route priorities #4985
-
Hi all, The question is how to determine priority for wildcard routes defined for HTTPProxy.
The intention is to define the following routes:
So, could you please advise on how can I achieve the desired behavior?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Currently, with the above configuration requests: If I change the first route with the prefix /api/data*stores then all requests are routed to UIService Any ideas how should I reorder routes to get desired behavior? |
Beta Was this translation helpful? Give feedback.
-
At the moment contour does not support globbing or regexes in prefix matches on an HTTPProxy due to inclusion rules and possible routing ambiguity, see this issue for some context: #1179 The matches you have written are taken literally and globbing is not considered, so you would need a request with a path prefix that contains the literal character In general, longer path prefixes are ordered first when sent to Envoy, so e.g. |
Beta Was this translation helpful? Give feedback.
At the moment contour does not support globbing or regexes in prefix matches on an HTTPProxy due to inclusion rules and possible routing ambiguity, see this issue for some context: #1179
The matches you have written are taken literally and globbing is not considered, so you would need a request with a path prefix that contains the literal character
*
in it to match the routes you've configuredIn general, longer path prefixes are ordered first when sent to Envoy, so e.g.
/foo/bar
will "win" over a route with match for/foo
given a request with path/foo/bar/baz