Baoyuantop commented on code in PR #13051:
URL: https://github.com/apache/apisix/pull/13051#discussion_r2871631029
##########
docs/en/latest/plugins/serverless.md:
##########
@@ -47,8 +47,13 @@ Only Lua functions are allowed here and not other Lua code.
For example, anonymous functions are legal:
```lua
-return function()
- ngx.log(ngx.ERR, 'one')
+return function(conf, ctx)
+ local core = require("apisix.core")
+ if not ngx.var.arg_name then
+ local uri_args = core.request.get_uri_args(ctx)
+ uri_args.name = "world"
+ ngx.req.set_uri_args(uri_args)
Review Comment:
please use core.request.set_uri_args
--
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]