Welcome! Log In Create A New Profile

Advanced

Re: Disable automatic urlencoding with proxy_pass

Matthieu Tourne
May 09, 2013 07:04PM
On Thu, May 9, 2013 at 2:37 AM, lupin <nginx-forum@nginx.us> wrote:

> Hi,
>
> Any way to disable urlencode on nginx with proxy_pass? Following is my
> config and as suggested on google I already removed the "/" URI part of
> of this "proxy_pass http://127.0.0.1:8090;"
>
> Any idea how to proceed with this?
>
>
I think I might have ran into something similar before.

Internally Nginx has 2 ways to deal with this directive :

proxy_pass http://127.0.0.1:8090;

Either you've never touched the internal uri (no internal redirects for
instance) and your outgoing uri is going to be exactly the same as the
incoming uri. Internally r->valid_unparsed_uri is set to 1.

Or your internal has been modified, and the outgoing uri used by proxy_pass
will be re-normalized.
The re-normalization process might turn up differences between incoming and
outgoing uri.

Another way to force Nginx to send out exactly what you want is to do
something like this :

map '' $seed_uri {
default $request_uri;
}

proxy_pass http://127.0.0.1:8090$seed_uri;

This way you're forcing what comes in to be exactly what comes out, but
this comes with a price and you won't be able to use internal redirection
and will have to modify the content of $seed_uri manually, using if and
regexps for instance.

Hope that helps,

Matthieu.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Disable automatic urlencoding with proxy_pass

lupin May 09, 2013 05:37AM

Re: Disable automatic urlencoding with proxy_pass

Francis Daly May 09, 2013 06:44PM

Re: Disable automatic urlencoding with proxy_pass

Matthieu Tourne May 09, 2013 07:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
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