0
0
mirror of https://github.com/rls-moe/nyx synced 2024-10-06 13:52:07 +02:00
nyx/http/middle/session.go

16 lines
252 B
Go
Raw Normal View History

package middle
import (
"github.com/icza/session"
"net/http"
)
func init() {
session.Global.Close()
session.Global = session.NewCookieManager(session.NewInMemStore())
}
func GetSession(r *http.Request) session.Session {
return session.Get(r)
}