Initialise SessionStore in Options

This commit is contained in:
Joel Speed
2019-05-20 11:26:04 +02:00
parent 17e97ab884
commit fbee5eae16
6 changed files with 48 additions and 11 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ func (s *SessionStore) makeCookie(req *http.Request, name string, value string,
// the configuration given
func NewCookieSessionStore(opts options.CookieStoreOptions, cookieOpts *options.CookieOptions) (sessions.SessionStore, error) {
var cipher *cookie.Cipher
if len(cookieOpts.CookieSecret) > 0 {
if opts.EnableCipher {
var err error
cipher, err = cookie.NewCipher(utils.SecretBytes(cookieOpts.CookieSecret))
if err != nil {