How to change email base_url to use "https://"?

The links discourse is sending in emails use the http:// scheme, not https. Is there a way I can modify the base_url for email templates?

I like to setup my webserver so all plaintext http requests are redirected to my https homepage. This ensures links shared externally with an incorrect scheme will not work, so an accidental future misconfiguration will not expose any users to MitM attacks. So the email links will be broken, as a redirect will not work.

1 Like

I Guess you need to enable the force_https settings in discourse

7 Likes

My Discourse is also sending emails with http://email.forum.mydomain.com/ links instead of https://email.forum.mydomain.com/

Iā€™m pretty sure I had force_https set to true before, and I went to check, but that setting is now missing from the admin. Where did it go?

1 Like

It is hidden and enabled by default on new installs. You can drop into the rails console and check for it there:

./launcher enter app
rails c
SiteSetting.force_https
SiteSetting.force_https = true
exit
exit
exit
3 Likes

Indeed it is set to true. So the question is why are the email links not https?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.