proxy_pass generates double slash

Francis Daly francis at
Thu Sep 29 08:45:44 UTC 2016

On Thu, Sep 29, 2016 at 10:27:29AM +0200, rainer at 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

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.


Francis Daly        francis at

More information about the nginx mailing list