mirror of
https://github.com/weloe/token-go.git
synced 2025-10-05 07:26:50 +08:00
refactor: update default cookie path
This commit is contained in:
@@ -71,6 +71,10 @@ func (e *Enforcer) responseToken(tokenValue string, loginModel *model.Login, ctx
|
||||
}
|
||||
}
|
||||
|
||||
if tokenConfig.CookieConfig.Path == "" {
|
||||
tokenConfig.CookieConfig.Path = "/"
|
||||
}
|
||||
|
||||
// add cookie use tokenConfig.CookieConfig
|
||||
ctx.Response().AddCookie(tokenConfig.TokenName,
|
||||
tokenValue,
|
||||
|
Reference in New Issue
Block a user