I am accessing a URL which has encode characters
http:....../malintha/tel%3A%2B6281808147137
location /gateway/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_read_timeout 5m;
proxy_send_timeout 5m;
proxy_pass http://10.1.1.1:9443$request_uri/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
}
I added $request_uri at then end of the proxy_pass URL as I have to stop decoding by nginx.
When I configure like this nginx resolve it to (stop decoding but incorrect URL - adding /gateway/)
/gateway/malintha/tel%3A%2B6281808147137
but When I remove $request_uri it resolve to correct URL (but with decoding)
How can I resolve this ?
malintha/tel:+6281808147137