举个例子,就是想要做到一个 location 中配置多个 proxy_pass 的效果,具体场景是三方短信回调只能配置一个地址,所以就想无脑把这个地址同时转发到多套环境的接口上。
location /api/message/xxx {
proxy_pass https://a.com/api/message/xxx/;
proxy_pass https://b.com/api/message/xxx/;
proxy_pass https://c.com/api/message/xxx/;
proxy_pass a target="_blank" href="https://d.com/api/message/xxx/;" rel="nofollow noopener">https://d.com/api/message/xxx/;
}
location /api/message/xxx {
proxy_pass https://a.com/api/message/xxx/;
proxy_pass https://b.com/api/message/xxx/;
proxy_pass https://c.com/api/message/xxx/;
proxy_pass a target="_blank" href="https://d.com/api/message/xxx/;" rel="nofollow noopener">https://d.com/api/message/xxx/;
}
