FIX: use absolute url for `/user_avatar/` links

This commit is contained in:
Arpit Jalan 2020-04-22 12:08:59 +05:30
parent 628ba9d1e2
commit c028e1aca7
1 changed files with 2 additions and 0 deletions

View File

@ -502,6 +502,8 @@ module ApplicationHelper
absolute_url = "#{Discourse.base_url}#{link}" absolute_url = "#{Discourse.base_url}#{link}"
elsif link.start_with?("/images/") elsif link.start_with?("/images/")
absolute_url = "#{Discourse.base_url}#{link}" 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) elsif GlobalSetting.relative_url_root && link.start_with?(GlobalSetting.relative_url_root)
absolute_url = "#{Discourse.base_url_no_prefix}#{link}" absolute_url = "#{Discourse.base_url_no_prefix}#{link}"
end end