This commit is contained in:
Alireza Ahmadi
2024-07-14 19:33:02 +02:00
parent 0bd090d087
commit f50bc16b61
3 changed files with 3 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ func init() {
func SetLoginUser(c *gin.Context, user *model.User) error {
s := sessions.Default(c)
s.Options(sessions.Options{
Path: "/",
HttpOnly: true,
})
s.Set(loginUser, user)