feat:In the development mode, the token timeout is adjusted to infinity(#169)
This commit is contained in:
1 parent
d4d4c9f574
commit
3af05af603
1 file changed
+5
@@ -288,6 +288,11 @@ func (mw *GinJWTMiddleware) MiddlewareInit() error {
|
||||
mw.Timeout = time.Duration(config2.JwtConfig.Timeout) * time.Second
|
||||
}
|
||||
|
||||
if config2.ApplicationConfig.Mode == "dev" {
|
||||
// TODO: dev mode token过期时长 为 100 年
|
||||
mw.Timeout = time.Duration(8760100) * time.Hour
|
||||
}
|
||||
|
||||
if mw.TimeFunc == nil {
|
||||
mw.TimeFunc = time.Now
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user