-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URIs with same prefix are not routed correctly #3021
Comments
If have a feeling that |
^- the above feeling is probably wrong (according to: https://github.com/Kong/kong/blob/master/kong/core/router.lua#L168), but this is indeed interesting case. I look more into it. |
Hmm... this seems to be the case, I couldn't reproduce this with First Request:
Second Request:
|
I cannot reproduce this with |
Hi, I am closing this issue because of lack of activity. @kushmansingh, If you think it is still unresolved, please reopen with the requested information. Thanks! |
Summary
Overlapping uris for an API definition are not routed correctly
Steps To Reproduce
curl -X POST -d '{"name":"foo", "uris":"/a,/a-alternate", "upstream_url":"https://google.com"}' localhost:8001/apis
curl localhost:8000/a
will always route correctly toohttps://google.com
curl localhost:8000/a-alternate
will route tohttps://google.com
correctly orhttps://google.com/-alternate
which is incorrect.Additional Details & Logs
However, if I have two separate API definitions, this will work fine as this was addressed in #2662
The text was updated successfully, but these errors were encountered: