Embed Images are set to https://domain.com:80 in email

I recently migrated my server, and I have no custom Nginx running in front of my discourse instance.
This is the regular plain vanilla discourse, set up following the Quick Start Guide. The content has been migrated from another server.

In the emails sent by the instance, I see that the domain is set like this https://domain.org:80


This is causing images to break. Any suggestions on what is likely happening and where could I reset it?

Is force_https enabled?

I don’t find that in the Settings in the new discourse instance. (Mine is latest: 2.4.0.beta4)

My guess is, at somepoint in time, this settting was removed


Since my let’s encrypt certificate is valid, I see my force_https set to true.

/var/www/discourse# cat config/discourse.conf |grep force_https
force_https = 'true'

Now, do I resolve this, https://domain.org:80 happening for smiley embeds, and email image embeds.
Something to do with my S3 instance https settting?

My redirect after auth went to this:


Who is adding this “:80” to the end of my domain?

Based on some other post, I resolved my problem like this.

$./launcher enter app
$ cd /var/www/discourse
/var/www/discourse# rails c
[1] pry(main)> SiteSetting.port
=> "80"
[2] pry(main)> SiteSetting.port=nil
=> nil
[3] pry(main)>

Port is a developer-only setting and never should be set on a production instance, so it is unclear how you got into that state.

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