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 faaa4dd2..74a55a24 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 @@ -109,6 +109,7 @@ func (this *IndexAction) RunPost(params struct { HttpAllNodeIPPageHTML string HttpAllNodeIPShowPage bool HttpAllEnableServerAddrVariable bool + HttpAllRequestOriginsWithEncodings bool HttpAllDomainAuditingIsOn bool HttpAllDomainAuditingPrompt string @@ -217,6 +218,7 @@ func (this *IndexAction) RunPost(params struct { config.HTTPAll.ForceLnRequest = params.HttpAllForceLnRequest config.HTTPAll.LnRequestSchedulingMethod = params.HttpAllLnRequestSchedulingMethod config.HTTPAll.EnableServerAddrVariable = params.HttpAllEnableServerAddrVariable + config.HTTPAll.RequestOriginsWithEncodings = params.HttpAllRequestOriginsWithEncodings // 访问日志 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 b09fe1a2..c68309b5 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 @@ -4,7 +4,7 @@
- {{item.name}} + {{item.name}}
@@ -288,7 +288,14 @@ 支持${serverAddr}变量 -

支持在自定义页面中使用${serverAddr}变量,表示访客当前正在访问的服务器地址。

+

选中后,表示支持在自定义页面中使用${serverAddr}变量,用来表示访客当前正在访问的服务器地址。

+ + + + 自动gzip回源 + + +

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

diff --git a/web/views/@default/clusters/cluster/settings/global-server-config/index.js b/web/views/@default/clusters/cluster/settings/global-server-config/index.js index d5848772..8a82cae0 100644 --- a/web/views/@default/clusters/cluster/settings/global-server-config/index.js +++ b/web/views/@default/clusters/cluster/settings/global-server-config/index.js @@ -13,9 +13,13 @@ Tea.context(function () { if (textContent == null || textContent.length == 0) { textContent = elements[i].innerText } + let itemId = elements[i].getAttribute("id") + if (window.location.hash == "#" + itemId) { + this.currentItem = itemId + } this.titleMenus.push({ name: textContent, - id: elements[i].getAttribute("id") + id: itemId }) } })