diff --git a/handlers/middleware.go b/handlers/middleware.go index 4b8ce60..e006f80 100644 --- a/handlers/middleware.go +++ b/handlers/middleware.go @@ -16,16 +16,7 @@ var ( memcache cache.Cache ) -// RequireLogin redirects unauthenticated users to the login page -func RequireLogin(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Context().Value("username") == nil { - http.Redirect(w, r, "/login", http.StatusFound) - return - } - next.ServeHTTP(w, r) - }) -} +// add middleware to log http requests; ai! func GetSession(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {