Fixed issue with secure cookie

This commit is contained in:
Jan Zípek 2022-08-25 08:33:39 +02:00
parent ee2d4a52b0
commit f50b8f1d2e
Signed by: kamen
GPG Key ID: A17882625B33AC31
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ func (s *AuthService) Login(ctx *gin.Context) error {
return err return err
} }
ctx.SetCookie(SESSION_ID, session.Id, int(time.Duration(time.Hour*24).Seconds()), "/", "", true, true) ctx.SetCookie(SESSION_ID, session.Id, int(time.Duration(time.Hour*24).Seconds()), "/", "", false, true)
return nil return nil
} }
@ -47,7 +47,7 @@ func (s *AuthService) Logout(ctx *gin.Context) error {
return err return err
} }
ctx.SetCookie(SESSION_ID, "", 0, "/", "", true, true) ctx.SetCookie(SESSION_ID, "", 0, "/", "", false, true)
return nil return nil
} }