添加ip审计功能

This commit is contained in:
bjdgyc
2021-08-05 18:20:13 +08:00
parent 1bb76e5d60
commit 0d4d2bb3c4
15 changed files with 173 additions and 32 deletions

View File

@@ -2,6 +2,6 @@ package base
const (
APP_NAME = "AnyLink"
// 修改为sql数据库
APP_VER = "0.5.1"
// 添加访问日志审计
APP_VER = "0.5.2"
)

View File

@@ -65,6 +65,7 @@ type ServerConfig struct {
SessionTimeout int `json:"session_timeout"` // in seconds
// AuthTimeout int `json:"auth_timeout"` // in seconds
AuditInterval int `json:"audit_interval"` // in seconds
}
func initServerCfg() {

View File

@@ -54,6 +54,7 @@ var configs = []config{
{Typ: cfgInt, Name: "mobile_dpd", Usage: "移动端死链接检测时间(秒)", ValInt: 60},
{Typ: cfgInt, Name: "session_timeout", Usage: "session过期时间(秒)", ValInt: 3600},
// {Typ: cfgInt, Name: "auth_timeout", Usage: "auth_timeout", ValInt: 0},
{Typ: cfgInt, Name: "audit_interval", Usage: "审计去重间隔(秒)", ValInt: 1800},
}
var envs = map[string]string{}