集群服务设置--访问日志中可以设置是否只记录通用Header

This commit is contained in:
GoEdgeLab
2022-10-24 14:39:32 +08:00
parent 3505b9107b
commit 681f392d3b
2 changed files with 16 additions and 1 deletions

View File

@@ -78,6 +78,8 @@ func (this *IndexAction) RunPost(params struct {
HttpAllAllowNodeIP bool HttpAllAllowNodeIP bool
HttpAllDefaultDomain string HttpAllDefaultDomain string
HttpAccessLogCommonRequestHeadersOnly bool
LogRecordServerError bool LogRecordServerError bool
Must *actions.Must Must *actions.Must
@@ -123,6 +125,8 @@ func (this *IndexAction) RunPost(params struct {
config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP
config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain
config.HTTPAccessLog.CommonRequestHeadersOnly = params.HttpAccessLogCommonRequestHeadersOnly
config.Log.RecordServerError = params.LogRecordServerError config.Log.RecordServerError = params.LogRecordServerError
err = config.Init() err = config.Init()

View File

@@ -47,7 +47,18 @@
</tr> </tr>
</table> </table>
<h4>日志</h4> <h4>访问日志</h4>
<table class="ui table definition selectable">
<tr>
<td class="title">只记录通用请求<br/>Header</td>
<td>
<checkbox name="httpAccessLogCommonRequestHeadersOnly" v-model="config.httpAccessLog.commonRequestHeadersOnly"></checkbox>
<p class="comment">选中后表示访问日志中只记录通用的HTTP请求Header比如<code-label>User-Agent</code-label>),其他自定义或非标准的(比如<code-label>Test-Header</code-label>)将不记录。</p>
</td>
</tr>
</table>
<h4>运行日志</h4>
<table class="ui table definition selectable"> <table class="ui table definition selectable">
<tr> <tr>
<td class="title">记录服务错误</td> <td class="title">记录服务错误</td>