From 501d8a97f6eac3ba3e89a7f60e3d1bc2c7fc72e5 Mon Sep 17 00:00:00 2001 From: SongLiang <462039091@qq.com> Date: Mon, 5 Nov 2018 09:50:19 +0800 Subject: [PATCH] add sessionId prefix --- session/session.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/session/session.go b/session/session.go index af8c47bc..74eb3b12 100644 --- a/session/session.go +++ b/session/session.go @@ -333,10 +333,7 @@ func (manager *Manager) sessionID() (string, error) { return "", fmt.Errorf("Could not successfully read from the system CSPRNG") } sid := hex.EncodeToString(b) - if manager.config.SessionIDPrefix != "" { - return manager.config.SessionIDPrefix + sid, nil - } - return sid, nil + return manager.config.SessionIDPrefix + sid, nil } // Set cookie with https.