endison1986 opened a new issue #5579:
URL: https://github.com/apache/apisix/issues/5579


   ### Issue description
   
   I write a plugin to forward request to other real route by an unitive url.
   
   I write `ngx.req.set_uri("/...", true);` in _M.write function, but get error 
message `API disabled in the context of access_by_lua*`. It means I cannot set 
`jump?` to `true` in access phase, but I alow cannot do this in _M.set, because 
 _M.set is blocked, I must do http request before rewrite uri.
   
   ```lua
   function _M.rewrite(conf, ctx)
   // rpc by http
   ngx.req.set_uri("/...", true);
   end
   ```
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`): Linux apisix-server-7bf4dd654f-729fq 
3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 
x86_64 GNU/Linux
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 
openresty/1.19.3.2
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 
{"id":"aac46492-9c9b-4dea-97c8-db491937d5ef","boot_time":1636444986,"etcd_version":"3.4.0","up_time":1203196,"last_report_time":1637648165,"version":"2.8","hostname":"apisix-server-7bf4dd654f-729fq"}
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   


-- 
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]


Reply via email to