looks good to me agile6v <agil...@apache.org>于2020年3月14日 周六上午10:33写道:
> Hi all, > > Is it necessary to provide a request mirror plugin? > > The nginx configuration looks like: > > 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, > agile6v > -- Thanks, Ming Wen, Apache APISIX & Apache SkyWalking Twitter: _WenMing