-
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
Proxy doesn't always respect "strip_uri" with multiple "uris" #2562
Labels
task/needs-investigation
Requires investigation and reproduction before classifying it as a bug or not.
Comments
Hi, Thanks for the report, we'll be looking into it. |
thibaultcha
added
the
task/needs-investigation
Requires investigation and reproduction before classifying it as a bug or not.
label
May 30, 2017
thibaultcha
added a commit
that referenced
this issue
May 31, 2017
Because of our Lua-land LRU cache, we used not to execute `match_api`, which takes care of discovering which configured uri matched a given API, and should be stripped. This operation is O(1) for plain text URIs, as well as hosts and methods, hence, we do not suffer any performance penalty. Fix #2562
Fix proposed in #2582! |
This will be released in 0.10.4 or 0.11.0. Thanks again for the report! |
Currently affected by this, do you have a nightly build of the kong container that would contain this fix? |
No, sorry. |
thibaultcha
added a commit
that referenced
this issue
Oct 19, 2017
Because of our Lua-land LRU cache, we used not to execute `match_api`, which takes care of discovering which configured uri matched a given API, and should be stripped. This operation is O(1) for plain text URIs, as well as hosts and methods, hence, we do not suffer any performance penalty. Fix #2562
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
task/needs-investigation
Requires investigation and reproduction before classifying it as a bug or not.
Summary
If I define an API with multiple URIs, and
strip_uri = true
, Kong doesn't always strip the matching prefix. When I first start Kong, it works with both URIs, then one of them stripping the prefix. Full example below.Steps To Reproduce
Start a kong:0.10.2 docker image
Add an API with multiple URIs
Request the API in both forms multiple times (it will eventually start happening)
Check the nginx logs (404s are expected):
docker logs -f nginx
172.17.0.4 - - [25/May/2017:13:53:24 +0000] "GET /a/b/c
172.17.0.4 - - [25/May/2017:13:53:33 +0000] "GET /a/b/c
172.17.0.4 - - [25/May/2017:13:53:41 +0000] "GET /a/b/c
172.17.0.4 - - [25/May/2017:13:53:45 +0000] "GET /a/b/c
172.17.0.4 - - [25/May/2017:13:53:50 +0000] "GET /x/y/z/a/b/c
You can see above that it eventually stops stripping the prefix on /x/y/z. However, /z/y/x still works as expected
Additional Details & Logs
The text was updated successfully, but these errors were encountered: