From: Sylas Date: Thu, 18 Apr 2013 04:34:08 +0000 (-0700) Subject: Override gravatar url to use SSL if gitlab has the SSL flag set to true. X-Git-Tag: v5.1.0~6^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1a92ae9fcb1e25579f8cd65b6c9683d193a97455;p=wvm%2Fgitlab.git Override gravatar url to use SSL if gitlab has the SSL flag set to true. --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 387172b58..61eb8271d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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