Avatar images broken behind proxy

Hello,

We recently had a firewall rule imposed on our servers such that all outbound HTTP/S requests had to be whitelisted to go outbound, either through a proxy or with a direct rule. Since then, some images have failed to load, in particular, avatars generate a 500 error, eg, [url]/letter_avatar_proxy/v4/letter/d/8edcca/45.png

edit before posting: The forum software understandably complains about links in posts by new users, so please substitute “$URL_GRAVATAR” = “www.gravatar.com

My best guess is that it’s trying to access $URL_GRAVATAR from within the container. I had our firewall guy set up an exception so that $URL_GRAVATAR gets a direct rule, and set "no_proxy=’$URL_GRAVATAR’ and rebuilt the container.

Within the container, I verify that no_proxy is set, and I can curl directly to the URL:

no_proxy='$URL_GRAVATAR,[etc],127.0.0.0/8'

# curl -Ik https://$URL_GRAVATAR
HTTP/2 302 
server: nginx

But, images still appear to be broken. Is there something I’m missing? I don’t have access to external logs to show what exactly it’s failing to access.

edit: the 302 redirect there is possibly the problem, it redirects to another address that I perhaps need to whitelist. If I do curl -IL $URL_GRAVATAR it gives me a proxy failure.

You need to allow https://avatars.discourse-cdn.com/ to fix the letter avatar.

3 Likes

Thanks, I’ll try that! Just gotta schedule a half hour downtime for the Discourse rebuild. :slight_smile:

Super frustrating trying to guess the access that stuff needs without access to the outgoing proxy logs. :confused:

1 Like

Confirmed working, by the way. Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.