サイトがプロキシの背後に移動され、ファビコンとヘッダーがもうhttpsを使用しなくなりました

さて、多くの失敗の後、ついに force_https=true で有効なログインを行う方法を発見しました。

Docker 環境では、/etc/nginx/conf.d/discourse.conf を以下のようにパッチ適用しました。


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; ← 変更した部分
proxy_pass http://discourse;
}

私の環境では、少なくともこのセクション内でのみ機能します。

これで完璧に動作しています!