From d1ef6da027e86ec6059ba07be5244ee727b4e8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Mon, 6 May 2024 14:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=AB=99=E5=85=A8=E5=B1=80=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E5=A2=9E=E5=8A=A0=E2=80=9CXFF=E4=B8=AD?= =?UTF-8?q?=E6=9C=80=E5=A4=9A=E5=9C=B0=E5=9D=80=E6=95=B0=E2=80=9D=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cluster/settings/global-server-config/index.go | 2 ++ .../cluster/settings/global-server-config/index.html | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/internal/web/actions/default/clusters/cluster/settings/global-server-config/index.go b/internal/web/actions/default/clusters/cluster/settings/global-server-config/index.go index 74a55a24..23af19ad 100644 --- a/internal/web/actions/default/clusters/cluster/settings/global-server-config/index.go +++ b/internal/web/actions/default/clusters/cluster/settings/global-server-config/index.go @@ -110,6 +110,7 @@ func (this *IndexAction) RunPost(params struct { HttpAllNodeIPShowPage bool HttpAllEnableServerAddrVariable bool HttpAllRequestOriginsWithEncodings bool + HttpAllXFFMaxAddresses int HttpAllDomainAuditingIsOn bool HttpAllDomainAuditingPrompt string @@ -219,6 +220,7 @@ func (this *IndexAction) RunPost(params struct { config.HTTPAll.LnRequestSchedulingMethod = params.HttpAllLnRequestSchedulingMethod config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable config.HTTPAll.RequestOriginsWithEncodings = params.HttpAllRequestOriginsWithEncodings + config.HTTPAll.XFFMaxAddresses = params.HttpAllXFFMaxAddresses // 访问日志 config.HTTPAccessLog.IsOn = params.HttpAccessLogIsOn diff --git a/web/views/@default/clusters/cluster/settings/global-server-config/index.html b/web/views/@default/clusters/cluster/settings/global-server-config/index.html index c68309b5..40e5f78d 100644 --- a/web/views/@default/clusters/cluster/settings/global-server-config/index.html +++ b/web/views/@default/clusters/cluster/settings/global-server-config/index.html @@ -298,6 +298,13 @@

选中后,表示自动使用Accept-Encoding: gzip, ...回源,可以用来节约源站流量。

+ + XFF中最多地址数 + + +

可以转发的X-Forwarded-For中最多的地址数,如果为0表示不限制;不要轻易修改此选项,避免无法获取真实的客户端地址。

+ +