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 4ee687c0..ce17dfe2 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 @@ -78,6 +78,8 @@ func (this *IndexAction) RunPost(params struct { HttpAllAllowNodeIP bool HttpAllDefaultDomain string + HttpAccessLogCommonRequestHeadersOnly bool + LogRecordServerError bool Must *actions.Must @@ -123,6 +125,8 @@ func (this *IndexAction) RunPost(params struct { config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain + config.HTTPAccessLog.CommonRequestHeadersOnly = params.HttpAccessLogCommonRequestHeadersOnly + config.Log.RecordServerError = params.LogRecordServerError err = config.Init() 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 dab4c153..41fa86c2 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 @@ -47,7 +47,18 @@ -

日志

+

访问日志

+ + + + + +
只记录通用请求
Header
+ +

选中后,表示访问日志中只记录通用的HTTP请求Header(比如User-Agent),其他自定义或非标准的(比如Test-Header)将不记录。

+
+ +

运行日志

记录服务错误