Skip to content

How to utilize Catch All, Empty Placeholders, Priority routing features correctly since v23+? #2136

Pinned Answered by raman-m
suchmememanyskill asked this question in Q&A
Discussion options

You must be logged in to vote

@suchmememanyskill wrote

For #2136 (comment), it's impossible to use priority to solve this. The first match will always swallow the entire url.

I haven't had the time to verify the accuracy of the statement, but it appears everything is detailed in my #2136 (comment).
Priorities are only sensible for applicable routes! In this instance, since the routes differ and each URL has just one applicable route, the Priority feature becomes redundant. Correct? Thus, for this scenario, you would need to use a different upstream path prefix, and a possible solution could be as follows:

  "Routes": [
    {
      "UpstreamPathTemplate": "/generic/{url}/{url2}",
      "DownstreamPathTemplate": "/gen…

Replies: 8 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@raman-m
Comment options

@suchmememanyskill
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@suchmememanyskill
Comment options

@raman-m
Comment options

@suchmememanyskill
Comment options

@raman-m
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by raman-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Routing Ocelot feature: Routing
2 participants
Converted from issue

This discussion was converted from issue #2134 on August 02, 2024 11:49.