nginx A 配置一个域名
使用nginx 的mirror复制流量
参考 Nginx 流量镜像使用技巧-腾讯云开发者社区-腾讯云 (tencent.com)
location /stage-api/corpWechatOa/approvalNotify {
proxy_pass http://java-test:9096/corpWechatOa/approvalNotify;
mirror /corpWechatOaMirror;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-proto $scheme;
}
location /corpWechatOaMirror {
proxy_pass http://java-dev:9096/corpWechatOa/approvalNotify;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-proto $scheme;
}