Set the session key from an env variable
This commit is contained in:
parent
fe36b1d23c
commit
b89616a904
2 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
|
Reference in a new issue