Skip to content

Commit 1761f41

Browse files
committed
fix: read cookieName-client if cookie with cookieName is not present
1 parent 00565c8 commit 1761f41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/utils/cookie.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ func SetCookie(gc *gin.Context, token string) {
2424
func GetCookie(gc *gin.Context) (string, error) {
2525
cookie, err := gc.Request.Cookie(constants.COOKIE_NAME)
2626
if err != nil {
27-
return "", err
27+
cookie, err = gc.Request.Cookie(constants.COOKIE_NAME + "-client")
28+
if err != nil {
29+
return "", err
30+
}
2831
}
2932

3033
return cookie.Value, nil

0 commit comments

Comments
 (0)