fix: get&set session

This commit is contained in:
email
2022-02-04 00:56:44 +08:00
parent d661134b03
commit a8f0c9a7b1
6 changed files with 62 additions and 29 deletions

View File

@ -3,6 +3,7 @@ package server
import (
"fmt"
"memos/api"
"memos/common"
"github.com/gorilla/sessions"
"github.com/labstack/echo-contrib/session"
@ -33,7 +34,7 @@ func NewServer() *Server {
HTML5: true,
}))
e.Use(session.Middleware(sessions.NewCookieStore([]byte("secret"))))
e.Use(session.Middleware(sessions.NewCookieStore([]byte(common.GenUUID()))))
s := &Server{
e: e,