fix: read cookieName-client if cookie with cookieName is not present
This commit is contained in:
parent
00565c8717
commit
1761f41691
|
@ -24,7 +24,10 @@ func SetCookie(gc *gin.Context, token string) {
|
|||
func GetCookie(gc *gin.Context) (string, error) {
|
||||
cookie, err := gc.Request.Cookie(constants.COOKIE_NAME)
|
||||
if err != nil {
|
||||
return "", err
|
||||
cookie, err = gc.Request.Cookie(constants.COOKIE_NAME + "-client")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
return cookie.Value, nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user