Welcome! Log In Create A New Profile

Advanced

Re: Automatic trailing slash redirect and scheme

Francis Daly
August 22, 2019 06:08PM
On Thu, Aug 22, 2019 at 03:22:38PM +0200, Jean-Daniel FISCHER wrote:

Hi there,

> I an trying to set the sheme used in automatic redirect generates by nginx
> when trailing slash is missing. The nginx server is behind a proxy that
> handles ssl, hence all requests are made using http so nginx use http in
> absolute redirect.
>
> Is there a way to configure nginx to use the value of
> "$http_x_forwarded_proto" ?

I think "not directly".

So, if the ssl-handling proxy does not have the equivalent of
proxy_redirect (http://nginx.org/r/proxy_redirect) to modify the Location:
header before it goes to the client; then you could use "absolute_redirect
off" (http://nginx.org/r/absolute_redirect) so that nginx will omit the
scheme and host and port from the Location: header, which all current
clients should Just Work with.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Automatic trailing slash redirect and scheme

Jean-Daniel FISCHER August 22, 2019 09:24AM

Re: Automatic trailing slash redirect and scheme

Igor A. Ippolitov August 22, 2019 11:10AM

Re: Automatic trailing slash redirect and scheme

Francis Daly August 22, 2019 06:08PM

Re: Automatic trailing slash redirect and scheme

Jean-Daniel FISCHER August 26, 2019 04:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready