FIX: Allow avatar downloads to follow redirects
This commit is contained in:
parent
2c0efac25e
commit
8b4e71cb21
|
@ -108,7 +108,7 @@ after_initialize do
|
|||
|
||||
def fetch_avatar_url(user)
|
||||
avatar_url = UrlHelper.absolute(Discourse.base_uri + user.avatar_template.gsub('{size}', '250'))
|
||||
URI(avatar_url).open('rb', redirect: false).read
|
||||
URI(avatar_url).open('rb', redirect: true, allow_redirections: :all).read
|
||||
rescue OpenURI::HTTPError
|
||||
# Ignore if fetching image returns a non 200 response
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue