You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create a regex path ~/(gw/)?api/(?<subpath>htest)$
match it against /api/htest
add the following request-transformer plugin config:
replace:
uri: /api/v2/$(uri_captures.subpath)
The route sent upstream is /api/v2/ instead of /api/v2/htest.
When I request /gw/api/htest (the gw/ optional group matches) the route sent upstream is correct: /api/v2/htest.
Expected Behavior
The route sent upstream is /api/v2/htest, respecting the subpath capture group even if the optional group doesn't match.
The traditional router behaves like this, the bug is only observed with traditional_compatible.
Is there an existing issue for this?
Kong version (
$ kong version
)3.6
Current Behavior
When I
traditional_compatible
router~/(gw/)?api/(?<subpath>htest)$
/api/htest
The route sent upstream is
/api/v2/
instead of/api/v2/htest
.When I request
/gw/api/htest
(thegw/
optional group matches) the route sent upstream is correct:/api/v2/htest
.Expected Behavior
The route sent upstream is
/api/v2/htest
, respecting thesubpath
capture group even if the optional group doesn't match.The
traditional
router behaves like this, the bug is only observed withtraditional_compatible
.Steps To Reproduce
Use this deck config:
with the
traditional_compatible
router on Kong 3.6.Anything else?
debug logs from request-transformer with route
/api/htest
:The text was updated successfully, but these errors were encountered: