“集群设置 -- 网站设置”增加“允许记录访问日志”选项

This commit is contained in:
刘祥超
2023-07-05 15:29:04 +08:00
parent 916cd0bf67
commit ceceda22a6

View File

@@ -2,10 +2,11 @@
package serverconfigs package serverconfigs
func DefaultGlobalServerConfig() *GlobalServerConfig { func NewGlobalServerConfig() *GlobalServerConfig {
var config = &GlobalServerConfig{} var config = &GlobalServerConfig{}
config.HTTPAll.SupportsLowVersionHTTP = true config.HTTPAll.SupportsLowVersionHTTP = true
config.HTTPAccessLog.IsOn = true
config.HTTPAccessLog.EnableRequestHeaders = true config.HTTPAccessLog.EnableRequestHeaders = true
config.HTTPAccessLog.EnableResponseHeaders = true config.HTTPAccessLog.EnableResponseHeaders = true
config.HTTPAccessLog.EnableCookies = true config.HTTPAccessLog.EnableCookies = true
@@ -40,6 +41,7 @@ type GlobalServerConfig struct {
} `yaml:"httpAll" json:"httpAll"` // HTTP统一配置 } `yaml:"httpAll" json:"httpAll"` // HTTP统一配置
HTTPAccessLog struct { HTTPAccessLog struct {
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用此功能
EnableRequestHeaders bool `yaml:"enableRequestHeaders" json:"enableRequestHeaders"` // 记录请求Header EnableRequestHeaders bool `yaml:"enableRequestHeaders" json:"enableRequestHeaders"` // 记录请求Header
CommonRequestHeadersOnly bool `yaml:"commonRequestHeadersOnly" json:"commonRequestHeadersOnly"` // 只保留通用Header CommonRequestHeadersOnly bool `yaml:"commonRequestHeadersOnly" json:"commonRequestHeadersOnly"` // 只保留通用Header
EnableResponseHeaders bool `yaml:"enableResponseHeaders" json:"enableResponseHeaders"` // 记录响应Header EnableResponseHeaders bool `yaml:"enableResponseHeaders" json:"enableResponseHeaders"` // 记录响应Header