From 4ea47057bd96b9b794a7b1383e147488fa6d0c62 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 26 Oct 2022 17:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E7=BE=A4=E5=85=A8=E5=B1=80=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=85=8D=E7=BD=AE=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E8=AE=BF=E9=97=AE=E6=97=A5=E5=BF=97=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/global_server_config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/serverconfigs/global_server_config.go b/pkg/serverconfigs/global_server_config.go index b5568ec..eef17b2 100644 --- a/pkg/serverconfigs/global_server_config.go +++ b/pkg/serverconfigs/global_server_config.go @@ -4,6 +4,9 @@ package serverconfigs func DefaultGlobalServerConfig() *GlobalServerConfig { var config = &GlobalServerConfig{} + config.HTTPAccessLog.EnableRequestHeaders = true + config.HTTPAccessLog.EnableResponseHeaders = true + config.HTTPAccessLog.EnableCookies = true config.Log.RecordServerError = false return config } @@ -19,7 +22,10 @@ type GlobalServerConfig struct { } `yaml:"httpAll" json:"httpAll"` HTTPAccessLog struct { + EnableRequestHeaders bool `yaml:"enableRequestHeaders" json:"enableRequestHeaders"` // 记录请求Header CommonRequestHeadersOnly bool `yaml:"commonRequestHeadersOnly" json:"commonRequestHeadersOnly"` // 只保留通用Header + EnableResponseHeaders bool `yaml:"enableResponseHeaders" json:"enableResponseHeaders"` // 记录响应Header + EnableCookies bool `yaml:"enableCookies" json:"enableCookies"` // 记录Cookie } `yaml:"httpAccessLog" json:"httpAccessLog"` // 访问日志配置 Log struct {