1
0
Fork 0
forked from forgejo/forgejo

Alwaywas return local url for users avatar (#8245)

* Always return local url for users avatar

Avoids having to wait for DNS lookups when libravatar is activated
fixing #6046

* Avoid double slash in avatar link

* Move avatar route to the correct place
This commit is contained in:
Sandro Santilli 2019-09-26 18:21:23 +02:00 committed by techknowlogick
parent b2b927808b
commit d958b9db4f
4 changed files with 53 additions and 3 deletions

View file

@ -173,7 +173,7 @@ func TestPushCommits_AvatarLink(t *testing.T) {
pushCommits.Len = len(pushCommits.Commits)
assert.Equal(t,
"https://secure.gravatar.com/avatar/ab53a2911ddf9b4817ac01ddcd3d975f?d=identicon",
"/suburl/user/avatar/user2/-1",
pushCommits.AvatarLink("user2@example.com"))
assert.Equal(t,