From 53c288d46ea37366b032191f46f93bd0ed18558a Mon Sep 17 00:00:00 2001 From: hoelee Date: Tue, 9 Jun 2026 11:29:00 +0800 Subject: [PATCH] feat(botfilter): add statusRecorder.WriteHeader --- botfilter.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/botfilter.go b/botfilter.go index 853d9d1e..1c5b2a90 100644 --- a/botfilter.go +++ b/botfilter.go @@ -105,3 +105,11 @@ type statusRecorder struct { status int } +func (r *statusRecorder) WriteHeader(status int) { + if r.status != 0 { + return + } + r.status = status + r.ResponseWriter.WriteHeader(status) +} +