-
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
Incorrect routing priority with wildcard host #3094
Comments
I've encountered a problem which appears to be similar. The scenario is the same except that both APIs have uris configured. The API with the subdomain specified in the host works, but the API with the wildcard specified does not work. Steps To Reproduce
|
Fixes issue reported here: #3094 (comment)
Fixes issue reported here: #3094 (comment)
Fixes issue reported here: #3094 (comment)
A new PR has been opened addressing this: #4775 |
Will be part of Kong 1.3. |
How can do this in DB less mode?? When I use regex in domain part in kong.yaml kong is throwing an error. I came across https://docs.konghq.com/hub/flash/set-dynamic-upstream-host/ which is not compatible in DB less mode. |
Summary
I believe the incorrect routing priority applied when there are two APIs configured, one with the
hosts
defined with a preceding wildcard, e.g.,*.domain.com
, and another with a matching host and auris
defined, e.g.,hosts: subdomain.domain.com
uris: /api
.Steps To Reproduce
subdomain.domain.com/api
. This request matches both APIs. Since api-2 defines two rules and api-1 only defines one, the request should be routed to api-2. However, in my tests, it's getting routed to api-1 atupstream_one.com
Additional Details & Logs
I observe this on a new orchestration of Kong following the guide in the kong-dist-kubernetes repo. This is running kong 0.11.2 backed by cassandra.
The text was updated successfully, but these errors were encountered: