summaryrefslogtreecommitdiffstats
path: root/roseh.moe.go
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2026-09-24 21:35:58 -0700
committerRose Hogenson <rosehogenson@posteo.net>2026-09-24 21:43:20 -0700
commit33e70e5fbacd6297f9c29838048287980cc4043f (patch)
treeac7781bde6af27cc31ba9c4737777ca61d470a4f /roseh.moe.go
parentSet server timeouts (diff)
downloadroseh.moe-33e70e5fbacd6297f9c29838048287980cc4043f.tar.zst
Revert "Add back logging"
This reverts commit 35687c90084ed61d00b17f1656c5a3db58f67b61.
Diffstat (limited to 'roseh.moe.go')
-rw-r--r--roseh.moe.go22
1 files changed, 3 insertions, 19 deletions
diff --git a/roseh.moe.go b/roseh.moe.go
index 4f0b86d..fd48b3c 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -1163,19 +1163,6 @@ func (h *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.h.ServeHTTP(w, r.WithContext(ctx))
}
-type loggingHandler struct {
- h http.Handler
-}
-
-func (h *loggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- u := *r.URL
- if strings.HasPrefix(u.Path, "/otp/") {
- u.Path = "/otp/__REDACTED__"
- }
- log.Printf("%q from %q", r.Method+" "+r.Host+u.String(), r.RemoteAddr)
- h.h.ServeHTTP(w, r)
-}
-
func main() {
flag.Parse()
@@ -1254,13 +1241,12 @@ func main() {
apiMux.HandleFunc("PUT /api/wormhole/{name}", wormholeAPIUpload)
mux.Handle("/api/", apiMux)
mux.Handle("/", &timeoutHandler{h: http.HandlerFunc(notFound), timeout: 5 * time.Minute})
- 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()
@@ -1282,10 +1268,8 @@ func main() {
}
cgitCGI.PathLocationHandler = cgitCGI
codeMux.Handle("/", &timeoutHandler{h: cgitCGI, timeout: 5 * time.Minute})
- serverMux.Handle("code."+selfURL.Hostname()+"/", &gzipHandler{codeMux})
+ http.Handle("code."+selfURL.Hostname()+"/", &gzipHandler{codeMux})
server := &http.Server{
- Handler: &loggingHandler{serverMux},
-
ReadHeaderTimeout: 5 * time.Minute,
IdleTimeout: 10 * time.Minute,
}