From 8fcbd02fc43efec3d4bb9edae19390c640e683b3 Mon Sep 17 00:00:00 2001 From: gmemstr Date: Wed, 27 Dec 2017 11:31:44 -0800 Subject: [PATCH] Remove GET from login route Will be replaced by vue frontend --- router/router.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/router/router.go b/router/router.go index e1cae5b..4a882c9 100644 --- a/router/router.go +++ b/router/router.go @@ -75,7 +75,7 @@ func Init() *mux.Router { r.Handle("/login", Handle( loginHandler(), - )).Methods("GET", "POST") + )).Methods("POST") r.Handle("/admin/publish", Handle( auth.RequireAuthorization(0), @@ -141,11 +141,6 @@ func loginHandler() common.Handler { return nil } - if r.Method == "GET" { - w.Header().Set("Content-Type", "text/html") - return common.ReadAndServeFile("assets/web/login.html", w) - } - err = r.ParseForm() if err != nil { return &common.HTTPError{