all repos — honk @ 1f84ec7414f996911c84b1c3150cac7999bc92b3

my fork of honk

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

1f84ec7414f996911c84b1c3150cac7999bc92b3

parent

4fc56940b5a18711d96b6ab1a6e0e7e0b0517bc4

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

jump to
M web.goweb.go

@@ -36,6 +36,7 @@ "syscall"

"time" "unicode/utf8" + "github.com/gorilla/handlers" "github.com/gorilla/mux" "humungus.tedunangst.com/r/webs/cache" "humungus.tedunangst.com/r/webs/gencache"

@@ -2985,8 +2986,8 @@

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

@@ -3002,12 +3003,9 @@ }

func logit(h http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { + handlers.LoggingHandler(os.Stdout, r) h.ServeHTTP(w, r) - - uri := r.URL.String() - method := r.Method - elog.Printf("masto: %s %s", method, uri) } return http.HandlerFunc(fn)