Is there a way to proxy pass based on query parameters? I need to proxy pass root url request to server A. But, if root url has certain query parameters i need to proxy pass to server B. How can i achieve this? Below is my current configuration:
location / {
proxy_pass http://xxxxxx;
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
}