Is it possible to remove query strings using proxy_pass in Nginx? For example i call my nginx on:
http://nginxproxy.com/api/v1/logout?session=123
And would like to proxy this to:
http://example.com/api/sessions/?_action=logout
Without the query string "session=123".
Currently my setup just adds any query string i pass to the proxy_pass URL.
location /api/v2/logout {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Session $arg_token;
proxy_pass http://example.com/api/sessions/?_action=logout;
}