mirror of
https://github.com/keven1024/015.git
synced 2026-06-07 04:49:34 +00:00
feat(backend): implement custom middleware for session management and context handling
This commit is contained in:
11
backend/middleware/session.go
Normal file
11
backend/middleware/session.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/labstack/echo-contrib/session"
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func SessionMiddleware() echo.MiddlewareFunc {
|
||||
return session.Middleware(sessions.NewCookieStore([]byte("secret")))
|
||||
}
|
||||
Reference in New Issue
Block a user