Commit 1a92ae9f authored by Sylas's avatar Sylas

Override gravatar url to use SSL if gitlab has the SSL flag set to true.

parent 26befdc7
...@@ -37,7 +37,7 @@ module ApplicationHelper ...@@ -37,7 +37,7 @@ module ApplicationHelper
if !Gitlab.config.gravatar.enabled || user_email.blank? if !Gitlab.config.gravatar.enabled || user_email.blank?
'no_avatar.png' 'no_avatar.png'
else else
gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url gravatar_url = request.ssl? || Gitlab.config.gitlab.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
user_email.strip! user_email.strip!
sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment