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表示不限制;不要轻易修改此选项,避免无法获取真实的客户端地址。

+ +