mirror of
https://github.com/rls-moe/nyx
synced 2024-11-14 22:12:24 +00:00
16 lines
252 B
Go
16 lines
252 B
Go
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)
|
|
}
|