You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "boekkooi-lengoo (via GitHub)" <gi...@apache.org> on 2023/12/08 12:10:22 UTC
Re: [I] help request: about radixtree_uri_with_parameter [apisix]
boekkooi-lengoo commented on issue #10257:
URL: https://github.com/apache/apisix/issues/10257#issuecomment-1847068128
Another options is to patch https://github.com/apache/apisix/blob/3.7.0/apisix/core/ctx.lua#L238 and add with sometime like:
```LUA
elseif core_str.has_prefix(key, "uri_arg_") then
if t._ctx.curr_req_matched then\
val = t._ctx.curr_req_matched[(sub_str(key, 9))]\
end
```
I just added the following to my dockerfile.
```
RUN sed -i \
-e '238i \
elseif core_str.has_prefix(key, "uri_arg_") then\
if t._ctx.curr_req_matched then\
val = t._ctx.curr_req_matched[(sub_str(key, 9))]\
end' \
/usr/local/apisix/apisix/core/ctx.lua
```
Now you can use `$uri_arg_codes` to access the var in `proxy-rewrite`.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org