From c9b7532339890d6bda287d23f129677cbabeefb0 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 13 Feb 2025 15:03:23 +0800 Subject: {http,ssh}_server.go: Add debug logs for incoming requests --- http_server.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'http_server.go') diff --git a/http_server.go b/http_server.go index 917d68c..5970cf7 100644 --- a/http_server.go +++ b/http_server.go @@ -6,11 +6,15 @@ import ( "net/http" "strconv" "strings" + + "go.lindenii.runxiyu.org/lindenii-common/clog" ) type http_router_t struct{} func (router *http_router_t) ServeHTTP(w http.ResponseWriter, r *http.Request) { + clog.Debug("Incoming HTTP: " + r.RemoteAddr + " " + r.Method + " " + r.RequestURI) + segments, _, err := parse_request_uri(r.RequestURI) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) -- cgit v1.2.3