Regular expression used to get the encoded URI portion of the $request_uri when unencoded $uri breaks a reverse proxy.
map $request_uri $request_uri_no_qs { "~^(?<m>[^\?]+)\?(?:.*)?" $m; default $request_uri; }