diff --git a/models/user.go b/models/user.go index ffee2dd9e593..ab43df7a1e02 100644 --- a/models/user.go +++ b/models/user.go @@ -76,7 +76,7 @@ func (user *User) AvatarLink() string { if base.Service.EnableCacheAvatar { return "/avatar/" + user.Avatar } - return "http://1.gravatar.com/avatar/" + user.Avatar + return "//1.gravatar.com/avatar/" + user.Avatar } // NewGitSig generates and returns the signature of given user. diff --git a/modules/base/tool.go b/modules/base/tool.go index 082c0392502c..9b165b979b98 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -143,7 +143,7 @@ func AvatarLink(email string) string { if Service.EnableCacheAvatar { return "/avatar/" + EncodeMd5(email) } - return "http://1.gravatar.com/avatar/" + EncodeMd5(email) + return "//1.gravatar.com/avatar/" + EncodeMd5(email) } // Seconds-based time units