aboutsummaryrefslogtreecommitdiff
path: root/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'web.go')
-rw-r--r--web.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/web.go b/web.go
index 9d90851c..d055c394 100644
--- a/web.go
+++ b/web.go
@@ -17,6 +17,7 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/auth"
+ "github.com/gogits/gogs/modules/avatar"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/mailer"
@@ -93,6 +94,9 @@ func runWeb(*cli.Context) {
m.Get("/stars", reqSignIn, user.Stars)
m.Get("/help", routers.Help)
+ avatarCache := avatar.HttpHandler("public/img/avatar/", "public/img/avatar/default.jpg")
+ m.Get("/avatar/:hash", avatarCache.ServeHTTP)
+
m.Group("/user", func(r martini.Router) {
r.Any("/login", binding.BindIgnErr(auth.LogInForm{}), user.SignIn)
r.Any("/sign_up", binding.BindIgnErr(auth.RegisterForm{}), user.SignUp)