Quellcode durchsuchen

fix: fix cookie path

JustSong vor 11 Monaten
Ursprung
Commit
03b3636d74
1 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  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)