From d7b8e9f179c341d8fd95d0449804033587a5a5f7 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 7 Jul 2023 08:31:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=AE=BF=E5=AE=A2IP?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=97=B6=E5=8E=BB=E9=99=A4=E9=A6=96=E5=B0=BE?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E7=9A=84=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/http_remote_addr_config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/serverconfigs/http_remote_addr_config.go b/pkg/serverconfigs/http_remote_addr_config.go index 04aaa89..ce02001 100644 --- a/pkg/serverconfigs/http_remote_addr_config.go +++ b/pkg/serverconfigs/http_remote_addr_config.go @@ -19,6 +19,7 @@ type HTTPRemoteAddrConfig struct { // Init 初始化 func (this *HTTPRemoteAddrConfig) Init() error { + this.Value = strings.TrimSpace(this.Value) if len(this.Value) == 0 { this.isEmpty = true } else if regexp.MustCompile(`\s+`).ReplaceAllString(this.Value, "") == "${remoteAddr}" {