From 6f1cfbd7185e36ee184912e97d598ac645f0cb11 Mon Sep 17 00:00:00 2001 From: SunBK201 Date: Sun, 2 Nov 2025 02:06:33 +0800 Subject: [PATCH] feat: normalize user agent for curl requests in pass-through records --- src/internal/statistics/statistics.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/internal/statistics/statistics.go b/src/internal/statistics/statistics.go index 69e40f2..c73fa78 100644 --- a/src/internal/statistics/statistics.go +++ b/src/internal/statistics/statistics.go @@ -29,6 +29,9 @@ func StartRecorder() { } } case record := <-passThroughRecordChan: + if strings.HasPrefix(record.UA, "curl/") { + record.UA = "curl/*" + } if r, exists := passThroughRecords[record.UA]; exists { r.Count++ r.Host = record.Host