mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 19:00:55 +00:00
add sessionId prefix
This commit is contained in:
parent
d3ad810f16
commit
501d8a97f6
@ -333,10 +333,7 @@ func (manager *Manager) sessionID() (string, error) {
|
|||||||
return "", fmt.Errorf("Could not successfully read from the system CSPRNG")
|
return "", fmt.Errorf("Could not successfully read from the system CSPRNG")
|
||||||
}
|
}
|
||||||
sid := hex.EncodeToString(b)
|
sid := hex.EncodeToString(b)
|
||||||
if manager.config.SessionIDPrefix != "" {
|
return manager.config.SessionIDPrefix + sid, nil
|
||||||
return manager.config.SessionIDPrefix + sid, nil
|
|
||||||
}
|
|
||||||
return sid, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set cookie with https.
|
// Set cookie with https.
|
||||||
|
Loading…
Reference in New Issue
Block a user