From 04da107c94262b810c2fb8f29229630a3d0765a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 4 May 2022 20:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=A7=84=E5=88=99=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=8D=95=E7=8B=AC=E8=AE=BE=E7=BD=AEUAM=EF=BC=88?= =?UTF-8?q?=E4=BB=85=E4=BC=81=E4=B8=9A=E7=89=88=E5=8F=AF=E7=94=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request.go | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/internal/nodes/http_request.go b/internal/nodes/http_request.go index 71ea7d4..012e91b 100644 --- a/internal/nodes/http_request.go +++ b/internal/nodes/http_request.go @@ -265,10 +265,19 @@ func (this *HTTPRequest) doBegin() { } // UAM - if !isHealthCheck && this.ReqServer.UAM != nil && this.ReqServer.UAM.IsOn { - if this.doUAM() { - this.doEnd() - return + if !isHealthCheck { + if this.web.UAM != nil { + if this.web.UAM.IsOn { + if this.doUAM() { + this.doEnd() + return + } + } + } else if this.ReqServer.UAM != nil && this.ReqServer.UAM.IsOn { + if this.doUAM() { + this.doEnd() + return + } } } @@ -521,6 +530,11 @@ func (this *HTTPRequest) configureWeb(web *serverconfigs.HTTPWebConfig, isTop bo } } + // UAM + if web.UAM != nil && (web.UAM.IsPrior || isTop) { + this.web.UAM = web.UAM + } + // 重写规则 if len(web.RewriteRefs) > 0 { for index, ref := range web.RewriteRefs {