You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/03/14 02:27:37 UTC
[GitHub] [incubator-apisix] agile6v opened a new issue #1262: feature:
support request mirror
agile6v opened a new issue #1262: feature: support request mirror
URL: https://github.com/apache/incubator-apisix/issues/1262
Hi
Is it necessary to provide a request mirror plugin?
The nginx configuration looks like:
```nginx
set $var_mirror_disable 1;
location / {
mirror /mirror_location;
proxy_pass $upstream_scheme://apisix_backend$upstream_uri;
}
location /mirror_location {
if ($var_mirror_disable) {
return 200;
}
proxy_pass $mirror_address;
}
```
The variable `var_mirror_disable` and `mirror_address` can be configured in the mirror plugin.
The admin api looks like this:
```
{
"plugins": {
"mirror": {
"address": "127.0.0.1:8090"
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
},
"uri": "/hello"
}'
```
In addition, it would be better if the mirror directive could support variable.
Thanks.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] agile6v closed issue #1262: feature: support
request mirror
Posted by GitBox <gi...@apache.org>.
agile6v closed issue #1262: feature: support request mirror
URL: https://github.com/apache/incubator-apisix/issues/1262
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1262: feature:
support request mirror
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1262: feature: support request mirror
URL: https://github.com/apache/incubator-apisix/issues/1262#issuecomment-599149447
discuss mail:
https://lists.apache.org/thread.html/ra5ea8a97f55b2b139b42b8c7b56fe26708fe3074fc34815afd52ea7d%40%3Cdev.apisix.apache.org%3E
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services