all repos — honk @ af5989d9184a8d63a1b46c2b5024c72a0c63b2e3

my fork of honk

u
Anirudh Oppiliappan x@icyphox.sh
Sun, 21 Jan 2024 23:07:14 +0200
commit

af5989d9184a8d63a1b46c2b5024c72a0c63b2e3

parent

547316d58593ef5261e2efca9d517b015693386f

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M web.goweb.go

@@ -2896,7 +2896,6 @@ }

mux := mux.NewRouter() mux.Use(login.Checker) - mux.Use(logit) mux.Handle("/api", login.TokenRequired(http.HandlerFunc(apihandler)))

@@ -2986,6 +2985,9 @@

// mastoshit mastopost := mux.Methods("POST").Subrouter() mastoget := mux.Methods("GET").Subrouter() + mastoget.Use(logit) + mastopost.Use(logit) + mastoget.HandleFunc("/oauth/authorize", showoauthlogin) mastopost.HandleFunc("/oauth/authorize", oauthorize) mastopost.HandleFunc("/oauth/token", oauthtoken)

@@ -3005,7 +3007,8 @@ h.ServeHTTP(w, r)

uri := r.URL.String() method := r.Method - elog.Println("masto:", method, uri) + status := r.Response.Status + elog.Printf("masto:%s %s (%s)", method, uri, status) } return http.HandlerFunc(fn)