cleanup and add a few stuff for http
This commit is contained in:
8
admin.go
8
admin.go
@@ -74,9 +74,6 @@ func (a *AdminConfig) NewAdminUser() {
|
||||
a.Users = append(a.Users, u)
|
||||
|
||||
log.WithFields(log.Fields{}).Warnf("Admin user password : %s", p)
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
func (a *AdminConfig) Run() {
|
||||
@@ -121,10 +118,11 @@ func (a *AdminConfig) Run() {
|
||||
|
||||
protected := r.Group("p", HttpAuth())
|
||||
protected.GET("test", HttpAnyHome)
|
||||
protected.GET("home", HttpAnyHome)
|
||||
|
||||
unprotected := r.Group("u", HttpNoAuth())
|
||||
unprotected.GET("signin", HttpAnySignIn)
|
||||
unprotected.POST("signin", HttpAnySignIn)
|
||||
unprotected.POST("signin", HttpPostSignIn)
|
||||
unprotected.GET("recover", HttpGetRecover)
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: a.Addr,
|
||||
|
||||
Reference in New Issue
Block a user