tokers opened a new issue #3857: URL: https://github.com/apache/apisix/issues/3857
### Issue description Currently the serverless plugin functions don't have args, when we want to access some per-request data in `api_ctx`, we have to use `ngx.ctx.api_ctx`, which is obscure for new users. So I think we can push the `api_ctx` table to all serverless functions. For instance, we can write a function like: ```json "serverless-pre-function": { "phase": "rewrite", "functions" : ["return function(api_ctx) ngx.log(ngx.ERR, \"consumer name is \", api_ctx.consumer_name); end"] } ``` ### Environment * apisix version (cmd: `apisix version`): * OS (cmd: `uname -a`): * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): * apisix-dashboard version, if have: ### Minimal test code / Steps to reproduce the issue 1. 2. 3. ### What's the actual result? (including assertion message & call stack if applicable) ### What's the expected result? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org