Browse Source

fix: fix cookie path

JustSong 11 tháng trước cách đây
mục cha
commit
03b3636d74
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      main.go

+ 5 - 5
main.go

@@ -65,11 +65,11 @@ func main() {
 	} else {
 		store = cookie.NewStore([]byte(common.SessionSecret))
 	}
-	//store.Options(sessions.Options{
-	//	Path:     "/",
-	//	HttpOnly: true,
-	//	MaxAge:   30 * 24 * 3600,
-	//})
+	store.Options(sessions.Options{
+		Path:     "/",
+		HttpOnly: true,
+		MaxAge:   30 * 24 * 3600,
+	})
 	server.Use(sessions.Sessions("session", store))
 
 	router.SetRouter(server, buildFS, indexPage)