nginx判断路径是否含有某个参数做判断
location ^~ /api/{
if($query_string ~ "type=1" ){
proxy_pass http://127.0.0.1:8080;
break;
}
proxy_pass http://127.0.0.1:8089;
}
location ^~ /api/{
if($query_string ~ "type=1" ){
proxy_pass http://127.0.0.1:8080;
break;
}
proxy_pass http://127.0.0.1:8089;
}