Kong / Kong/kong

Kong issue with backend routing in Kong 3.7.1 in Service resources vs 2.8.x. other service pathing issues

Open
#13,402 6 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Lua
Stars
44.1k
Forks
5.2k
Avg merge
2d 1h
Merged PRs (30d)
2

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Kong version (`$ kong version`)

3.7.1

### Current Behavior

Both with route using: "path_handling": "v1", which is deprecated but should still behave with same behavior. And ```traditional_compatible``` default running 3.7.x

2.8.x routing behaviors:

Route in Kong: ```/api/clm/apiresource/v2```
Service Host +port + path: ```myapi.com:443/my/api/v2```

Consumer calls: ```gateway.com/api/clm/apiresource/v2.0```
Kong calls API behind it with: ```myapi.com:443/my/api/v2.0```

So Kong gets extra ```.0``` on end of proxy url and appends it to the backend host like people would expect gateways to.

3.7.x routing behaviors:

Route in Kong: ```/api/clm/apiresource/v2```
Service Host +port + path: ```myapi.com:443/my/api/v2```

Consumer calls: ```gateway.com/api/clm/apiresource/v2.0```
Kong calls API behind it with: ```myapi.com:443/my/api/v2/.0```

So Kong gets extra ```.0``` on end of proxy url and appends ```/.0``` it to the backend host which breaks apis that do v{major}.{minor} proxy URL routing and is not expected.

Slightly similar to my other trailing ```/``` issue but slightly different issue here in breaking change too.

### Expected Behavior

Kong should always smart append what the customer passes on proxy url appended to backend URLs and not add extra characters. Some of the new routing behaviors of Kong don't seem to make common sense anymore for this issue and the other one I raised.

### Steps To Reproduce

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the reported routing configuration and compare the 2.8.x and 3.7.1 behaviors using the example route, service path, and request URL. Reproduction is needed because no steps or files are provided; done means the backend receives the appended .0 without an added /.0, while preserving the documented path_handling and traditional_compatible behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.