From 2a3f087c400928af07793b6c0af4b434d1449536 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 1 Jan 2023 19:26:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E7=BE=A4=E6=9C=8D=E5=8A=A1=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E5=A2=9E=E5=8A=A0=E6=80=A7=E8=83=BD=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/global-server-config/index.go | 10 ++++++++++ .../settings/global-server-config/index.html | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) 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 9b2ea85f..0778349c 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 @@ -85,6 +85,9 @@ func (this *IndexAction) RunPost(params struct { LogRecordServerError bool + PerformanceAutoWriteTimeout bool + PerformanceDebug bool + Must *actions.Must CSRF *actionutils.CSRF }) { @@ -124,17 +127,24 @@ func (this *IndexAction) RunPost(params struct { } } + // 域名 config.HTTPAll.AllowMismatchDomains = allowMismatchDomains config.HTTPAll.AllowNodeIP = params.HttpAllAllowNodeIP config.HTTPAll.DefaultDomain = params.HttpAllDefaultDomain + // 访问日志 config.HTTPAccessLog.EnableRequestHeaders = params.HttpAccessLogEnableRequestHeaders config.HTTPAccessLog.EnableResponseHeaders = params.HttpAccessLogEnableResponseHeaders config.HTTPAccessLog.CommonRequestHeadersOnly = params.HttpAccessLogCommonRequestHeadersOnly config.HTTPAccessLog.EnableCookies = params.HttpAccessLogEnableCookies + // 日志 config.Log.RecordServerError = params.LogRecordServerError + // 性能 + config.Performance.AutoWriteTimeout = params.PerformanceAutoWriteTimeout + config.Performance.Debug = params.PerformanceDebug + err = config.Init() if err != nil { this.Fail("配置校验失败:" + err.Error()) 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 78b2bc24..29965932 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 @@ -90,6 +90,24 @@ +

性能

+ + + + + + + + + +
自动写数据超时 + +

向客户端发送数据时自动设置超时时间,如果超时,则自动视为慢连接,并关闭网络连接。

+
调试模式 + +

开启调试模式后,将在某些信息中包含调试信息。

+
+ \ No newline at end of file