shreemaan-abhishek commented on code in PR #10485:
URL: https://github.com/apache/apisix/pull/10485#discussion_r1401573125
##########
apisix/core/utils.lua:
##########
@@ -292,11 +292,16 @@ local resolve_var
do
local _ctx
local n_resolved
- local pat = [[(?<!\\)\$\{?(\w+)\}?]]
+ local pat = [[(?<!\\)\$(\{(\w+)\}|(\w+))]]
local _escaper
local function resolve(m)
- local v = _ctx[m[1]]
+ local i = 1
+ -- if first capture's first char is "{" evaluate the second capture
+ if m[1]:byte(1) == 123 then
Review Comment:
it works
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]