From 44e40b46151e951aa744b8e0c6a369c511a957a2 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 17 Apr 2024 15:45:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E7=9B=97=E9=93=BE=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E2=80=9C=E4=BE=8B=E5=A4=96URL=E2=80=9C?= =?UTF-8?q?=E5=92=8C=E2=80=9C=E9=99=90=E5=88=B6URL=E2=80=9D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request_referers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/nodes/http_request_referers.go b/internal/nodes/http_request_referers.go index 9fc77d7..c33a565 100644 --- a/internal/nodes/http_request_referers.go +++ b/internal/nodes/http_request_referers.go @@ -12,6 +12,11 @@ func (this *HTTPRequest) doCheckReferers() (shouldStop bool) { return } + // 检查URL + if !this.web.Referers.MatchURL(this.URL()) { + return + } + var origin = this.RawReq.Header.Get("Origin") const cacheSeconds = "3600" // 时间不能过长,防止修改设置后长期无法生效