Skip to content
Snippets Groups Projects
Commit 1a92ae9f authored by Sylas's avatar Sylas
Browse files

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

parent 26befdc7
No related branches found
No related tags found
1 merge request!3625Use secure Gravatar url when https is set to true in the configuration
Loading
Loading
@@ -37,7 +37,7 @@ module ApplicationHelper
if !Gitlab.config.gravatar.enabled || user_email.blank?
'no_avatar.png'
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!
sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment