xzycn opened a new issue, #11539:
URL: https://github.com/apache/apisix/issues/11539
### Description
I want to redirect some requests to upstream servers, how should I do for
this case?
How can I refer to upstream server chosen by loadbalancer in uri field in
redirect plugin.
like this:
```json
{
"uri": "/test/index.html",
"plugins": {
"redirect": {
"uri": "$upstream_addr",
"ret_code": 301
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:80": 1
}
}
}
```
as demenstrated above, I want a variable like "$upstream_addr".
Thanks.
### Environment
- APISIX version (run `apisix version`): 3.6.0
- Operating system (run `uname -a`): Linux vps-e63e72b3 5.15.0-82-generic
#91-Ubuntu SMP Mon Aug 14 14:14:14 UTC 2023 x86_64 GNU/Linux
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx
version: openresty/1.21.4.2
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`): 3.5.0
--
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]