diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2026-09-24 16:35:21 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2026-09-24 16:35:21 -0700 |
| commit | 811995e93c4df2c60cbf0537047ec8f454889fae (patch) | |
| tree | 0304bef3e07cd153d7da4bcf0b030618bead88b2 /roseh.moe.go | |
| parent | Revert "Log host" (diff) | |
| download | roseh.moe-811995e93c4df2c60cbf0537047ec8f454889fae.tar.zst | |
Revert "Add request logging"
This reverts commit 6c9803d2ba8373b963fca749f6b0c6cb8b2eb07d.
Diffstat (limited to 'roseh.moe.go')
| -rw-r--r-- | roseh.moe.go | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/roseh.moe.go b/roseh.moe.go index e39a001..54ce6f4 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -1069,15 +1069,6 @@ func (h *authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { h.h.ServeHTTP(w, r) } -type loggingHandler struct { - h http.Handler -} - -func (h *loggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - log.Printf("%q from %q", r.Method+" "+r.URL.String(), r.RemoteAddr) - h.h.ServeHTTP(w, r) -} - func main() { flag.Parse() @@ -1153,13 +1144,12 @@ func main() { apiMux.HandleFunc("PUT /api/wormhole/{name}", wormholeAPIUpload) mux.Handle("/api/", apiMux) mux.HandleFunc("/", notFound) - serverMux := http.NewServeMux() - serverMux.Handle(selfURL.Hostname()+"/", http.NewCrossOriginProtection().Handler(&gzipHandler{mux})) + http.Handle(selfURL.Hostname()+"/", http.NewCrossOriginProtection().Handler(&gzipHandler{mux})) jellyfinURL, err := url.Parse("http://127.0.0.1:8096") if err != nil { log.Fatal(err) } - serverMux.Handle("cinema."+selfURL.Hostname()+"/", &authHandler{h: &httputil.ReverseProxy{ + http.Handle("cinema."+selfURL.Hostname()+"/", &authHandler{h: &httputil.ReverseProxy{ Rewrite: func(r *httputil.ProxyRequest) { r.SetURL(jellyfinURL) r.SetXForwarded() @@ -1181,8 +1171,7 @@ func main() { } cgitCGI.PathLocationHandler = cgitCGI codeMux.Handle("/", cgitCGI) - serverMux.Handle("code."+selfURL.Hostname()+"/", &gzipHandler{codeMux}) - http.Handle("/", &loggingHandler{serverMux}) + http.Handle("code."+selfURL.Hostname()+"/", &gzipHandler{codeMux}) port := selfURL.Port() if port == "" { |
