channing
(Channing)
2018 年 7 月 7 日午後 4:25
1
こんにちは、
Discourse フォーラム(ホストシステム上の Let’s Encrypt + nginx)で HTTPS を有効にしました。リダイレクトは追加していないため、訪問者は HTTP または HTTPS のどちらでもアクセスできます。すべて期待通りに動作しました。
その後、Google OAuth2 認証を有効にしようと試みました。しかし、フォーラムが HTTPS で開かれているにもかかわらず、Discourse が Google OAuth2 を呼び出す際に redirect_uri に HTTP のフォーラム URL が設定されていることに気づきました。
これをどうすれば修正できますか?私のフォーラムは https://discussion.listary.com/ です。ご助力をいただき、ありがとうございます。
Do You have force https enabled?
「いいね!」 1
channing
(Channing)
2018 年 7 月 7 日午後 6:26
3
No. Is there a Discourse setting for that?
Indeed there is!
In admin > settings
Search for force https and enable it.
「いいね!」 2
channing
(Channing)
2018 年 7 月 7 日午後 6:55
5
Just tried that setting. And unfortunately, it’s still the same.
I think Discourse should be able to detect the original protocol automatically. I don’t know why it doesn’t work in my case.
channing
(Channing)
2018 年 7 月 8 日午前 3:08
6
I got it working. I used Certbot to manage Let’s Encrypt on my host system. It turned out that some rules Certbot added to the nginx config file is not fully compaitible with Discourse docker. I fixed it according to Running other websites on the same machine as Discourse .
「いいね!」 3