You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
I spent way too much time debugging something that ended up being completely trivial: I had missed the fact that the example service only listen for an exact path:
So, this rule matches ${Path} and ${Path}/*, however it takes two rules to do it. If you want to save on rules and reduce this down to only one rule, you could use ${Path}*. ${Path}* will match any string prefixed with with ${Path} which may be undesirable in some circumstances so you need to be careful.
You can work around this somewhat by use of prioritises however. Take for example:
Rule 1
Priority: 201
Pattern:/foo*
Rule 2
Priority: 101
Pattern: /food*
Rule 3
Priority: 301
Pattern: /foobar*
In this example, /foo/page will go to Rule 1, whereas /food/page will go to Rule 2 because Rule 2 will be evaluated first in priority. However, /foobar will be taken by Rule 1, not Rule 3, due to Rule 3 having a lower priority than Rule 1.
@NightKhaos That is true, however I would argue that people with enough rules to run into that limitations are more likely to be capable to come up with this workaround. The risk for unexpected matches for less experienced people is something to think about.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I spent way too much time debugging something that ended up being completely trivial: I had missed the fact that the example service only listen for an exact path:
My services, and most I suspect unless your micro services are really tiny, handle a fair number of subpaths as well, so I needed two listeners rules:
Would it make sense to do that in the reference templates as well? If so I'll happily submit a PR.
The text was updated successfully, but these errors were encountered: