Welcome! Log In Create A New Profile

Advanced

Why does nginx rewrite sending https to http?

Kevin
April 26, 2017 12:34PM
Hi,

I'm trying to rewrite some route in cloud foundry static buildpack, but
whenever I rewrite, the https goes to http.

So I add return with / with /login, then it goes to http://server/, even it
starts with https://server/login.


location /login {
return 301 /;

<% if ENV["FORCE_HTTPS"] %>
if ($http_x_forwarded_proto != "https") {
return 301 https://$host$request_uri;
}
<% end %>
}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Why does nginx rewrite sending https to http?

Kevin April 26, 2017 12:34PM

Re: Why does nginx rewrite sending https to http?

Francis Daly April 29, 2017 08:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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