|
@@ -6,7 +6,8 @@ import (
|
|
|
"time"
|
|
|
|
|
|
"github.com/gin-contrib/sessions"
|
|
|
- "github.com/gin-contrib/sessions/memstore"
|
|
|
+ "github.com/gin-contrib/sessions/cookie"
|
|
|
+ //"github.com/gin-contrib/sessions/memstore"
|
|
|
"github.com/gin-gonic/gin"
|
|
|
"gopkg.in/mgo.v2/bson"
|
|
|
)
|
|
@@ -14,7 +15,7 @@ import (
|
|
|
var Router = gin.Default()
|
|
|
|
|
|
func init() {
|
|
|
- store := memstore.NewStore([]byte("jy_data_extract"))
|
|
|
+ store := cookie.NewStore([]byte("jy_data_extract"))
|
|
|
Router.Use(sessions.Sessions("mysession", store))
|
|
|
gob.Register(&map[string]interface{}{})
|
|
|
gob.Register(&[]map[string]interface{}{})
|