Our discourse Images are not lightboxed

It shows me an error in the log file, that it cannot access /uploads/....

Can't reach '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' to get its dimension.

I can access the image woithout problems if I enter the url into a webbrowser:
https://domain.com/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png

Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 3000)
Completed 200 OK in 318ms (Views: 1.2ms | ActiveRecord: 0.0ms | Allocations: 50347)
Can't reach '/uploads/default/original/1X/fe2af548af4a22f4802ddaa54afa557ae557417c.png' to get its dimension.
Started GET "/posts/96" for 84.115.50.36 at 2020-07-04 14:15:14 +0000
Processing by PostsController#show as JSON
  Parameters: {"id"=>"96"}

It shows me no error with https not forced.

Completed 200 OK in 18ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 3050)
Completed 200 OK in 296ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 49562)
Started GET "/posts/97" for 84.115.50.36 at 2020-07-04 14:17:43 +0000
Processing by PostsController#show as JSON
  Parameters: {"id"=>"97"}

It looks to me as if Discourse downloads for some reason the image again from the webserver to do some lightbox stuff with it.
If i download this image manually within the Discourse Docker container, then it tries to access its webserver directly via its internal IP address instead if accessing it via the proxy. This works via http, but not via https.

The webserver itself has only http available, but it tries to access it via https what then fails.

I am wondering why does Discourse downloads the picture again from its webserver instead of accessing it internaly without http/https.

Edit: I found out, that I renamed the app.yml with domain.name.yml and this caused docker to change the DNS name of domain.name to its internal IP address. I renamed it to domain_name.yml and everything is working fine now.

1 Like