Cleanup.
This commit is contained in:
@@ -46,7 +46,6 @@ func (a *App) _signinSubmit(s *api.Session, w http.ResponseWriter, r *http.Reque
|
||||
|
||||
sess, err := a.api.Session_SignIn(pwd)
|
||||
if err != nil {
|
||||
time.Sleep(time.Duration(rand.Int64N(int64(4 * time.Second))))
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ func withLogging(inner http.HandlerFunc) http.HandlerFunc {
|
||||
wrapper := responseWriterWrapper{w, 0, 0}
|
||||
|
||||
inner(&wrapper, r)
|
||||
_log.Printf("%s \"%s %s %s\" %d %d %v\n",
|
||||
_log.Printf("%s \"%s %s %s\" %d %d %v",
|
||||
r.RemoteAddr,
|
||||
r.Method,
|
||||
r.URL.Path,
|
||||
|
||||
@@ -3,7 +3,7 @@ package hub
|
||||
import "net/http"
|
||||
|
||||
func (a *App) registerRoutes() {
|
||||
a.mux.Handle("GET /static/", http.FileServerFS(staticFS))
|
||||
a.mux.Handle("GET /static/", withLogging(http.FileServerFS(staticFS).ServeHTTP))
|
||||
a.handlePub("GET /", a._root)
|
||||
|
||||
a.handleNotSignedIn("GET /sign-in/", a._signin)
|
||||
|
||||
Reference in New Issue
Block a user