קישורי תמונות שבורים (חלק https: לא נכלל)

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:

https://mydomain/uploads/default/…"

it returns:

“//mydomain/uploads/default/…”

It happened overnight and I have no idea why, I haven’t changed anything on my server config for a long time.

Any ideas, this is killing me =(

Thank you

לייק 1

How did you install Discourse?

Are those images no longer displaying?

לייק 1

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.

לייק 1

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://”

לייק 1

Mixed content warnings. Modern browsers are blocking HTTP (insecure) content from loading over HTTPS (secure) connections.

When you have “Force HTTPS” enabled, every URL that Discourse loads will be secure.

2 לייקים