Optional capture groups are broken with the request-transformer plugin and traditional_compatible router #13014
Closed
1 task done
Labels
good first issue
Issues that beginners/volunteers can easily help with.
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: