Skip to content

Route matching priority is confusing / not intuitive #7887

Answered by bungle
chris-branch asked this question in Help
Discussion options

You must be logged in to vote
GET /foo/bar - resolves to route-1 (BAD)

It resolves to route-1 as with route-1 more criterias match:

  1. matches method
  2. matches path prefix

whereas with route-2 it only matches path prefix.

It would be hugely breaking change if we change this. We would probably instead rather add exact match, OR add this as an option. Nginx supports things like =, ^~.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chris-branch
Comment options

Answer selected by javierguerragiraldez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
2 participants