Hello, for some reason my post attachment image urls are not being returned correctly, the “http:” is not included so the image_url field instead of returning:
I installed discourse in a ubuntu server digital ocean droplet like 1 years ago. It’s been flawless until today which I found this error. I discovered that enabling “enforce https” solves the problem but why didn’t I need it until today? I’m not sure.
If the URL format changed without you doing anything, my assumption would be that your server automatically updates Discourse and this was the trigger but I wouldn’t expect the URL comparison you used to be a problem. Unless you’re displaying that URL to users for them to be able to copy, it should work as-is.
A URL beginning “//” uses the same scheme as the document referencing it, i.e. if you successfully visit the page over HTTP, it’s equivalent to “http://”. If you visit the page over HTTPS, it’s equivalent to “https://”