The discussion revolves around an issue with URLs for avatars and emoticons adding :80 to the end of the domain. merefield initially reports that some avatars are missing in quoted posts and discovers that the issue is due to the addition of :80 to the image URL. Removing the :80 resolves the issue.
The conversation explores possible causes, including NGINX configuration, but jomaxro notes that the NGINX instance is running inside the Discourse Docker container.
merefield suspects that the issue is related to a recent switch to force_https and finds that the problematic posts were submitted around that time. A temporary fix using discourse remap resolves some issues, but the problem persists.
Upon further investigation, zogstrip suggests checking the SiteSetting.port value, which returns 80. zogstrip advises setting the value to nil to resolve the issue, which merefield confirms fixes the problem without requiring a restart.
I am having an issue where some avatars are missing where you’ve quoted someone in a post.
On investigating I noticed ‘:80’ being added to the end of each domain in the image URL for some avatars, but not others. When I copied a failed image’s URL(which begins https://) into a new browser tab and removed the :80 the avatar loaded fine.
What is going wrong? Why is port 80 being used within the URL and how best to resolve this?
Interestingly when you go and edit your post, the images in the preview work fine - they are missing the ‘:80’.
Yes it does. Discourse runs NGINX inside the docker container, so that might be what you’re seeing. That’s not my area of expertise, unfortunately, you’ll need to wait for someone else who can confirm if the NGINX you’re seeing is inside or outside the container.
Quite correct, I’d initially assumed it was happening to custom avatars only, now it seems to be inconsistent. Updated issue title and detail accordingly, apologies.
I did a bit more digging and the problem posts seemed to have been submitted around the time I switched force_https … I’m guessing that’s the source of the problem. I’m going to try to do a remap of the posts.
Oh dear this is still happening and affecting emoticons too! I can use the workaround above but something is still baking :80 into image URLs in the first place and I cannot keep running the workaround …