diff options
author | Sandro Santilli <strk@kbt.io> | 2019-09-26 18:21:23 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-09-26 12:21:23 -0400 |
commit | d958b9db4fa0f1910b3ca82338e3d68a70efedd9 (patch) | |
tree | 9f2de2fd82eed04ac8ed5cc26771824ba4648506 /routers/routes | |
parent | b2b927808b201eef44ef26be7d8529c315fcd170 (diff) | |
download | gitea-d958b9db4fa0f1910b3ca82338e3d68a70efedd9.tar.gz gitea-d958b9db4fa0f1910b3ca82338e3d68a70efedd9.zip |
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
Diffstat (limited to 'routers/routes')
-rw-r--r-- | routers/routes/routes.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go index e18ac0923e..5262d4ad5c 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -404,6 +404,7 @@ func RegisterRoutes(m *macaron.Macaron) { // r.Get("/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds) m.Any("/activate", user.Activate, reqSignIn) m.Any("/activate_email", user.ActivateEmail) + m.Get("/avatar/:username/:size", user.Avatar) m.Get("/email2user", user.Email2User) m.Get("/recover_account", user.ResetPasswd) m.Post("/recover_account", user.ResetPasswdPost) |