Welcome! Log In Create A New Profile

Advanced

Re: proxy_pass redirect for address without trailing slash disregards Host port

Francis Daly
August 30, 2019 03:46PM
On Sat, Aug 24, 2019 at 11:17:34AM +0200, Nuno Gonçalves wrote:

Hi there,

> That's not correct, the server is taking the Host domain part from the
> client Host header. It's just not taking the port part.
>
> This inconsistency is why I believe it's a bug.

Before "absolute_redirect", I would have called it a bug too.

Now I just consider it "a feature".

I think that nginx has never used the port from the Host header (or from
the request line, if present) in its redirects.

I think that it might be useful for nginx to be able to use that -- as in
"a redirect could optionally use exactly the host:port provided in the
string from the request that nginx used to choose the server{}" -- but
I guess that no-one who cared enough about it provided a justification
and a patch.

And now, "absolute_redirect off;" probably makes it unnecessary.


If you know that you want to use exactly one "unusual" port in the url,
I think that it is possible to fake it using server_name and the various
*_in_redirect directives. But that is not a general solution.

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 redirect for address without trailing slash disregards Host port

Nuno Gonçalves August 23, 2019 01:40PM

Re: proxy_pass redirect for address without trailing slash disregards Host port

Jeffrey 'jf' Lim August 24, 2019 02:24AM

Re: proxy_pass redirect for address without trailing slash disregards Host port

Nuno Gonçalves August 24, 2019 05:18AM

Re: proxy_pass redirect for address without trailing slash disregards Host port

Jeffrey 'jf' Lim August 24, 2019 09:34AM

Re: proxy_pass redirect for address without trailing slash disregards Host port

Nuno Gonçalves August 24, 2019 09:36AM

Re: proxy_pass redirect for address without trailing slash disregards Host port

Jeffrey 'jf' Lim August 24, 2019 10:02AM

Re: proxy_pass redirect for address without trailing slash disregards Host port

Francis Daly August 30, 2019 03:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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