Ativei o HTTPS para o meu fórum Discourse (Let’s Encrypt + nginx no sistema host). Nenhuma redireção foi adicionada, então os visitantes podem usar HTTP ou HTTPS. Tudo funcionou como esperado.
Em seguida, tentei ativar a autenticação Google Oauth2. No entanto, notei que o Discourse chamou o Google Oauth2 com redirect_uri definido como a URL HTTP do fórum, enquanto o fórum estava aberto com HTTPS.
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.