Anonymous User
September 29, 2016 04:28AM
Hi,


I need to proxy a location and remove the location-URL at the same time.

As I found out, this is achieved by adding a slash at the end of the
proxy_pass directive.

This works almost as intended, but it adds a double-slash to the
beginning of the URL as it arrives on the other server.


So, if /bla/hence/here/index.php is requested, what arrives on the other
server is really //hence/here/index.php.


location /bla {

proxy_pass https://target:4444/;

}
....


Does anybody have a solution for this?
I have another site where this is no problem (because the target is yet
another nginx that just compacts the double-slashes (I assume).

However, this time the target is a node.js app that I have no control
over - and it obviously can't really make sense of this, resulting in a
404.

Personally, I consider this a bug on the side of the node.js app - but I
would hope there is a way to remove that double-slash on the nginx-side.


Thanks in advance.

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

proxy_pass generates double slash

Anonymous User September 29, 2016 04:28AM

Re: proxy_pass generates double slash

Francis Daly September 29, 2016 04:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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