Fixed issue with secure cookie
This commit is contained in:
parent
ee2d4a52b0
commit
f50b8f1d2e
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue