mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-03 23:20:25 +08:00
“集群设置 -- 网站设置”增加“允许记录访问日志”选项
This commit is contained in:
@@ -14,6 +14,11 @@ const (
|
||||
|
||||
// 日志
|
||||
func (this *HTTPRequest) log() {
|
||||
// 检查全局配置
|
||||
if this.nodeConfig != nil && this.nodeConfig.GlobalServerConfig != nil && !this.nodeConfig.GlobalServerConfig.HTTPAccessLog.IsOn {
|
||||
return
|
||||
}
|
||||
|
||||
var ref *serverconfigs.HTTPAccessLogRef
|
||||
if !this.forceLog {
|
||||
if this.disableLog {
|
||||
|
||||
@@ -197,7 +197,7 @@ func (this *Node) execGlobalServerConfigChangedTask(rpcClient *rpc.RPCClient) er
|
||||
return err
|
||||
}
|
||||
if len(resp.GlobalServerConfigJSON) > 0 {
|
||||
var globalServerConfig = serverconfigs.DefaultGlobalServerConfig()
|
||||
var globalServerConfig = serverconfigs.NewGlobalServerConfig()
|
||||
err = json.Unmarshal(resp.GlobalServerConfigJSON, globalServerConfig)
|
||||
if err != nil {
|
||||
return errors.New("decode global server config failed: " + err.Error())
|
||||
|
||||
Reference in New Issue
Block a user