From 52eddd8c6b614584276f971d666fe23f0a078103 Mon Sep 17 00:00:00 2001 From: MrStashley Date: Mon, 11 Mar 2024 15:07:02 -0700 Subject: [PATCH] fixed logs --- wavesrv/cmd/main-server.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wavesrv/cmd/main-server.go b/wavesrv/cmd/main-server.go index 265da3108..c2d133771 100644 --- a/wavesrv/cmd/main-server.go +++ b/wavesrv/cmd/main-server.go @@ -682,18 +682,15 @@ func AuthKeyMiddleWare(next http.Handler) http.Handler { reqAuthKey := r.Header.Get("X-AuthKey") w.Header().Set(CacheControlHeaderKey, CacheControlHeaderNoCache) if reqAuthKey == "" { - log.Printf("mk2\n") w.WriteHeader(500) w.Write([]byte("no x-authkey header")) return } if reqAuthKey != GlobalAuthKey { - log.Printf("mk1\n") w.WriteHeader(500) w.Write([]byte("x-authkey header is invalid")) return } - log.Printf("mk3\n") next.ServeHTTP(w, r) }) } @@ -927,7 +924,7 @@ func main() { gr.HandleFunc("/api/read-file", AuthKeyWrap(HandleReadFile)) gr.HandleFunc("/api/write-file", AuthKeyWrap(HandleWriteFile)).Methods("POST") configPath := path.Join(scbase.GetWaveHomeDir(), "config") + "/" - log.Printf("config path: %v\n", configPath) + log.Printf("[wave] config path: %q\n", configPath) gr.PathPrefix("/config/").Handler(AuthKeyMiddleWare(http.StripPrefix("/config/", http.FileServer(http.Dir(configPath))))) serverAddr := MainServerAddr