Welcome! Log In Create A New Profile

Advanced

Nginx add location details to URL when we stop decoding URL

February 13, 2015 01:07AM
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
Subject Author Posted

Nginx add location details to URL when we stop decoding URL

malintha February 13, 2015 01:07AM

Re: Nginx add location details to URL when we stop decoding URL

Maxim Dounin February 13, 2015 08:00AM

Re: Nginx add location details to URL when we stop decoding URL

malintha February 14, 2015 01:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready