优化系统用户登录校验

This commit is contained in:
GoEdgeLab
2020-12-07 11:45:45 +08:00
parent 000b5c79e3
commit 8f1e5e4fc0
11 changed files with 74 additions and 48 deletions

View File

@@ -2,6 +2,7 @@ package nodes
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configs"
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/errors"
"github.com/TeaOSLab/EdgeAdmin/internal/events"
"github.com/iwind/TeaGo"
@@ -60,7 +61,7 @@ func (this *AdminNode) Run() {
TeaGo.NewServer(false).
AccessLog(false).
EndAll().
Session(sessions.NewFileSessionManager(86400, secret)).
Session(sessions.NewFileSessionManager(86400, secret), teaconst.CookieSID).
ReadHeaderTimeout(3 * time.Second).
ReadTimeout(600 * time.Second).
Start()