mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-09 20:10:27 +08:00
集群服务设置增加“记录找不到网站日志”选项
This commit is contained in:
@@ -226,14 +226,21 @@ func (this *HTTPListener) emptyServer() *serverconfigs.ServerConfig {
|
|||||||
Type: serverconfigs.ServerTypeHTTPProxy,
|
Type: serverconfigs.ServerTypeHTTPProxy,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查是否开启访问日志
|
||||||
|
if sharedNodeConfig != nil {
|
||||||
|
var globalServerConfig = sharedNodeConfig.GlobalServerConfig
|
||||||
|
if globalServerConfig != nil && globalServerConfig.HTTPAccessLog.EnableServerNotFound {
|
||||||
var accessLogRef = serverconfigs.NewHTTPAccessLogRef()
|
var accessLogRef = serverconfigs.NewHTTPAccessLogRef()
|
||||||
// TODO 需要配置是否记录日志
|
|
||||||
accessLogRef.IsOn = true
|
accessLogRef.IsOn = true
|
||||||
accessLogRef.Fields = append([]int{}, serverconfigs.HTTPAccessLogDefaultFieldsCodes...)
|
accessLogRef.Fields = append([]int{}, serverconfigs.HTTPAccessLogDefaultFieldsCodes...)
|
||||||
server.Web = &serverconfigs.HTTPWebConfig{
|
server.Web = &serverconfigs.HTTPWebConfig{
|
||||||
IsOn: true,
|
IsOn: true,
|
||||||
AccessLogRef: accessLogRef,
|
AccessLogRef: accessLogRef,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO 需要对访问频率过多的IP进行惩罚
|
||||||
|
|
||||||
return server
|
return server
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user