Set the session key from an env variable

This commit is contained in:
Las Zenow 2020-12-03 15:43:47 +00:00
parent fe36b1d23c
commit b89616a904
2 changed files with 11 additions and 3 deletions

View file

@ -3,13 +3,14 @@ package trantor
import (
"encoding/hex"
"net/http"
"os"
"github.com/gorilla/securecookie"
"github.com/gorilla/sessions"
"gitlab.com/trantor/trantor/lib/database"
)
var sesStore = sessions.NewCookieStore(securecookie.GenerateRandomKey(64))
var sesStore = sessions.NewCookieStore([]byte(os.Getenv("SESSION_KEY")))
type Notification struct {
Title string