On Tue, Aug 25, 2015 at 12:35:55AM +0200, Joó Ádám wrote:
Hi there,
> The return directive allows the use of URLs relative to the server, in
> which case the scheme, server name and port are automatically
> prepended by Nginx.
>
> The port is, however, the port on which the request was received,
Hi,
Maybe you can use following config which is shorter and does not use the
evil "if".
map $http_host $redirect_port {
default "";
.*(:\d+) $1;
}
return 302 $scheme://$host$redirect_port/
On Tue, Aug 25, 2015, 06:35 Joó Ádám wrote:
> Hi,
>
> The return directive allows the use of URLs
Hi,
The return directive allows the use of URLs relative to the server, in
which case the scheme, server name and port are automatically
prepended by Nginx.
The port is, however, the port on which the request was received,
which is not always the port to which the request was sent, i. e. the
one