Sito spostato dietro proxy, favicon e intestazione non usano più HTTPS

Bene, dopo così tanti tentativi falliti, ho finalmente capito come ottenere un login valido con force_https=true.

Nell’ambiente Docker, ho modificato /etc/nginx/conf.d/discourse.conf come segue:


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; <— Ciò che ho modificato
proxy_pass http://discourse;
}

E funziona solo in questa sezione, almeno nel mio ambiente.

Funziona benissimo ora!