From 0ed4d6669f6c3394e7d34ca478b008dd7b07c8fb Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Fri, 26 Dec 2025 11:01:30 -0600 Subject: [PATCH] don't use default mux --- internal/module/http-server.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/module/http-server.go b/internal/module/http-server.go index 5e95914..ebeae93 100644 --- a/internal/module/http-server.go +++ b/internal/module/http-server.go @@ -54,7 +54,7 @@ func (hs *HTTPServer) Type() string { return hs.config.Type } -func (hs *HTTPServer) HandleDefault(w http.ResponseWriter, r *http.Request) { +func (hs *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") response := ResponseData{ @@ -82,11 +82,9 @@ func (hs *HTTPServer) HandleDefault(w http.ResponseWriter, r *http.Request) { } func (hs *HTTPServer) Run() error { - http.HandleFunc("/", hs.HandleDefault) - httpServer := &http.Server{ Addr: fmt.Sprintf(":%d", hs.Port), - Handler: http.DefaultServeMux, + Handler: hs, } go func() {