Skip to content

Commit

Permalink
FIX: use absolute url for /user_avatar/ links
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitjalan committed Apr 22, 2020
1 parent 628ba9d commit c028e1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/helpers/application_helper.rb
Expand Up @@ -502,6 +502,8 @@ def get_absolute_image_url(link)
absolute_url = "#{Discourse.base_url}#{link}"
elsif link.start_with?("/images/")
absolute_url = "#{Discourse.base_url}#{link}"
elsif link.start_with?("/user_avatar/")
absolute_url = "#{Discourse.base_url}#{link}"
elsif GlobalSetting.relative_url_root && link.start_with?(GlobalSetting.relative_url_root)
absolute_url = "#{Discourse.base_url_no_prefix}#{link}"
end
Expand Down

0 comments on commit c028e1a

Please sign in to comment.