Welcome! Log In Create A New Profile

Advanced

Re: proxy_pass generates double slash

Francis Daly
September 29, 2016 04:48AM
On Thu, Sep 29, 2016 at 10:27:29AM +0200, rainer@ultra-secure.de wrote:

Hi there,

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

That's not quite correct.

The documentation is at http://nginx.org/r/proxy_pass

You almost certainly want to have the same number of slashes at the end
of your "location" and at the end of your "proxy_pass".

> location /bla {

Make that be "location /bla/" and you will probably be happier.

> Personally, I consider this a bug on the side of the node.js app -

I would say that that is arguable -- /one and //one are different
urls. It may be common and "friendly" to handle them in the same way,
but I don't think it should be required. GIGO applies, and it is less
work for the server to decline to try to guess what the client means,
when the client could send the correct information the first time.

> but I would hope there is a way to remove that double-slash on the
> nginx-side.

Just don't add it in the first place, as above.

Cheers,

f
--
Francis Daly francis@daoine.org

_______________________________________________
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: 249
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