summaryrefslogtreecommitdiffstats
path: root/modules/avatar/avatar.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/avatar/avatar.go')
-rw-r--r--modules/avatar/avatar.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go
index 49a501bf96..1960578b92 100644
--- a/modules/avatar/avatar.go
+++ b/modules/avatar/avatar.go
@@ -44,8 +44,9 @@ var gravatarSource string
func UpdateGravatarSource() {
gravatarSource = setting.GravatarSource
log.Debug("avatar.UpdateGravatarSource(gavatar source): %s", gravatarSource)
- if !strings.HasPrefix(gravatarSource, "http:") {
- gravatarSource = "http:" + gravatarSource
+ if !strings.HasPrefix(gravatarSource, "http://") ||
+ !strings.HasPrefix(gravatarSource, "https://") {
+ gravatarSource = "http://" + gravatarSource
log.Debug("avatar.UpdateGravatarSource(update gavatar source): %s", gravatarSource)
}
}