From 428591a08b4e0c9b41f6a06fd0c96c6bcfe9ccb8 Mon Sep 17 00:00:00 2001 From: hoelee Date: Tue, 9 Jun 2026 10:22:00 +0800 Subject: [PATCH] feat(botfilter): add statusRecorder.statusCode --- botfilter.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/botfilter.go b/botfilter.go index e30efc67..159a2da0 100644 --- a/botfilter.go +++ b/botfilter.go @@ -120,3 +120,10 @@ func (r *statusRecorder) Write(data []byte) (int, error) { return r.ResponseWriter.Write(data) } +func (r *statusRecorder) statusCode() int { + if r.status == 0 { + return http.StatusOK + } + return r.status +} +