add sessionId prefix

This commit is contained in:
SongLiang 2018-11-05 09:50:19 +08:00 committed by GitHub
parent d3ad810f16
commit 501d8a97f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -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.