I am still having this problem. I dug into the code a bit, and as I expected, https://avatars.discourse-cdn.com/#{params[:version]}/letter/#{params[:letter]}/#{params[:color]}/#{params[:size]}.png" is what the code is actually requesting. Within the Discourse container, I’m able to wget the file directly and get a valid PNG. For example: https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/48.png → https://forum.pkp.sfu.ca/48.png
In production.log, it shows the image being successfully downloaded, allegedly:
Started GET "/presence/get?channels%5B%5D=%2Fdiscourse-presence%2Freply%2F88689&channels%5B%5D=%2Fdiscourse-presence%2Fwhisper%2F88689" for 172.17.1.79 at 2024-07-09 19:59:01 +0000
Processing by PresenceController#get as JSON
Parameters: {"channels"=>["/discourse-presence/reply/88689", "/discourse-presence/whisper/88689"]}
Processing by UserAvatarsController#show_proxy_letter as PNG
Parameters: {"version"=>"v4", "letter"=>"b", "color"=>"bcef8e", "size"=>"48"}
Completed 200 OK in 14ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 3095)
Completed 418 in 9ms (Views: 0.4ms | ActiveRecord: 0.0ms | Allocations: 1680)
So for whatever reason, I’m still getting a blank image. Maybe it’s not using HTTP_PROXY or HTTPS_PROXY or something.
In site_settings.yml, it says that the default letter_avatar_proxy url is: "/letter_avatar_proxy/v4/letter/{first_letter}/{color}/{size}.png" and when I rightclick on one of the images to get the URL, it is (correctly?) https://forum.pkp.sfu.ca/letter_avatar_proxy/v4/letter/b/bcef8e/48.png