Moved site behind proxy, favicon and header not using https anymore

Well, after so many unsuccessful attempts, I finally figured out how to have a valid login with force_https=true.

In the docker env., I patched /etc/nginx/conf.d/discourse.conf as follows:


location @discourse {
limit_conn connperip 20;
limit_req zone=flood burst=12 nodelay;
limit_req zone=bot burst=100 nodelay;
proxy_set_header Host $http_host;
proxy_set_header X-Request-Start “t=${msec}”;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https; # $thescheme; ← What I modified
proxy_pass http://discourse;
}

And it only works in this section, at least with my environment.

Works great now!

1 Like