From 68545001032e707f56d83506fd172e2cf1508d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 30 Mar 2025 22:22:25 +0900 Subject: [PATCH] feat: add more log --- procuratio.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/procuratio.go b/procuratio.go index 84582fd..c7f32b8 100644 --- a/procuratio.go +++ b/procuratio.go @@ -10,16 +10,18 @@ import ( ) func (g *Gemini) handler(w http.ResponseWriter, r *http.Request) { + extractIP(r) if len(r.URL.Path) <= 1 { + fmt.Println("[ERR]", r.RemoteAddr, "400 Invalid Path", r.URL.String()) http.Error(w, "400 Invalid Path", http.StatusBadRequest) return } k := r.URL.Query().Get("key") if k == "" { + fmt.Println("[ERR]", r.RemoteAddr, "400 Empty API Key", r.URL.String()) http.Error(w, "400 Empty API Key", http.StatusBadRequest) return } - extractIP(r) v := &Visit{ UserKey: k, Time: time.Now().UnixMilli(),