From c45675c2a1eb983b13155da8e3e61b7e713f7f9a Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 25 Aug 2021 16:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4ACME=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=93=BE=E6=8E=A5=E7=9A=84=E4=BC=98=E5=85=88?= =?UTF-8?q?=E7=BA=A7=E4=B8=BA=E6=9C=80=E9=AB=98=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=9B=A0URL=E8=B7=B3=E8=BD=AC=E8=80=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=94=B3=E8=AF=B7=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_request.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/nodes/http_request.go b/internal/nodes/http_request.go index 57c6603..9151929 100644 --- a/internal/nodes/http_request.go +++ b/internal/nodes/http_request.go @@ -167,6 +167,16 @@ func (this *HTTPRequest) Do() { // 开始调用 func (this *HTTPRequest) doBegin() { + // 特殊URL处理 + if len(this.rawURI) > 1 && this.rawURI[1] == '.' { + // ACME + // TODO 需要配置是否启用ACME检测 + if strings.HasPrefix(this.rawURI, "/.well-known/acme-challenge/") { + this.doACME() + return + } + } + // 统计 if this.web.StatRef != nil && this.web.StatRef.IsOn { this.doStat() @@ -179,16 +189,6 @@ func (this *HTTPRequest) doBegin() { } } - // 特殊URL处理 - if len(this.rawURI) > 1 && this.rawURI[1] == '.' { - // ACME - // TODO 需要配置是否启用ACME检测 - if strings.HasPrefix(this.rawURI, "/.well-known/acme-challenge/") { - this.doACME() - return - } - } - // 临时关闭页面 if this.web.Shutdown != nil && this.web.Shutdown.IsOn { this.doShutdown()