Issue description
I need to configure route which implement similar logic as this nginx config:
location ~ ^/foo/bar(/.*)? {
return 302 $scheme://$host/app/bar$1$is_args$args;
}
But in redirect plugin I can only use $uri, which will contains /foo which I want to remove in the redirct locaton.
Environment
- apisix version (cmd:
apisix version): 2.0
- OS (cmd:
uname -a): Linux
- OpenResty / Nginx version (cmd:
nginx -V or openresty -V): 1.19.3.1
- 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:
- luarocks version, if the issue is about installation (cmd:
luarocks --version):
Issue description
I need to configure route which implement similar logic as this nginx config:
But in redirect plugin I can only use $uri, which will contains /foo which I want to remove in the redirct locaton.
Environment
apisix version): 2.0uname -a): Linuxnginx -Voropenresty -V): 1.19.3.1curl http://127.0.0.1:9090/v1/server_infoto get the info from server-info API):luarocks --version):