Aw: Re: Encoding URL before passing it on to reverse proxied application

Garbage at gmx.de Garbage at gmx.de
Fri Oct 19 08:31:33 UTC 2018


> > Is one of these approaches possible ?
> 
> You can easily do something like this:
> 
>    rewrite ^ /foo? break;
>    proxy_pass http://localhost:8080;
>    proxy_set_header X-Original-URI $request_uri;
> 
> This will replace the URI as seen by the upstream server to 
> "/foo" without any request arguments, and the original request URI 
> will be sent in the X-Original-URI header.

Thanks a lot, this looks promising. I will give it a try


More information about the nginx mailing list