集群全局服务配置中增加多个访问日志相关选项

This commit is contained in:
GoEdgeLab
2022-10-26 17:49:25 +08:00
parent a5f75a87f2
commit 9474d6d45e
2 changed files with 27 additions and 0 deletions

View File

@@ -78,7 +78,10 @@ func (this *IndexAction) RunPost(params struct {
HttpAllAllowNodeIP bool HttpAllAllowNodeIP bool
HttpAllDefaultDomain string HttpAllDefaultDomain string
HttpAccessLogEnableRequestHeaders bool
HttpAccessLogEnableResponseHeaders bool
HttpAccessLogCommonRequestHeadersOnly bool HttpAccessLogCommonRequestHeadersOnly bool
HttpAccessLogEnableCookies bool
LogRecordServerError bool LogRecordServerError bool
@@ -125,7 +128,10 @@ 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.EnableRequestHeaders = params.HttpAccessLogEnableRequestHeaders
config.HTTPAccessLog.EnableResponseHeaders = params.HttpAccessLogEnableResponseHeaders
config.HTTPAccessLog.CommonRequestHeadersOnly = params.HttpAccessLogCommonRequestHeadersOnly config.HTTPAccessLog.CommonRequestHeadersOnly = params.HttpAccessLogCommonRequestHeadersOnly
config.HTTPAccessLog.EnableCookies = params.HttpAccessLogEnableCookies
config.Log.RecordServerError = params.LogRecordServerError config.Log.RecordServerError = params.LogRecordServerError

View File

@@ -49,6 +49,13 @@
<h4>访问日志</h4> <h4>访问日志</h4>
<table class="ui table definition selectable"> <table class="ui table definition selectable">
<tr>
<td>记录请求Header</td>
<td>
<checkbox name="httpAccessLogEnableRequestHeaders" v-model="config.httpAccessLog.enableRequestHeaders"></checkbox>
<p class="comment">选中后表示在访问日志中记录请求Header。</p>
</td>
</tr>
<tr> <tr>
<td class="title">只记录通用请求<br/>Header</td> <td class="title">只记录通用请求<br/>Header</td>
<td> <td>
@@ -56,6 +63,20 @@
<p class="comment">选中后表示访问日志中只记录通用的HTTP请求Header比如<code-label>User-Agent</code-label>),其他自定义或非标准的(比如<code-label>Test-Header</code-label>)将不记录。</p> <p class="comment">选中后表示访问日志中只记录通用的HTTP请求Header比如<code-label>User-Agent</code-label>),其他自定义或非标准的(比如<code-label>Test-Header</code-label>)将不记录。</p>
</td> </td>
</tr> </tr>
<tr>
<td>记录响应Header</td>
<td>
<checkbox name="httpAccessLogEnableResponseHeaders" v-model="config.httpAccessLog.enableResponseHeaders"></checkbox>
<p class="comment">选中后表示在访问日志中记录响应Header。</p>
</td>
</tr>
<tr>
<td>记录Cookie</td>
<td>
<checkbox name="httpAccessLogEnableCookies" v-model="config.httpAccessLog.enableCookies"></checkbox>
<p class="comment">选中后表示访问日志中记录Cookie内容。</p>
</td>
</tr>
</table> </table>
<h4>运行日志</h4> <h4>运行日志</h4>