v2.9.0
Some checks failed
Release 3X-UI / Analyze Go code (push) Waiting to run
Release 3X-UI / build (386) (push) Blocked by required conditions
Release 3X-UI / build (amd64) (push) Blocked by required conditions
Release 3X-UI / build (arm64) (push) Blocked by required conditions
Release 3X-UI / build (armv5) (push) Blocked by required conditions
Release 3X-UI / build (armv6) (push) Blocked by required conditions
Release 3X-UI / build (armv7) (push) Blocked by required conditions
Release 3X-UI / build (s390x) (push) Blocked by required conditions
Release 3X-UI / Build for Windows (push) Blocked by required conditions
CodeQL Advanced / Analyze (go) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled

This commit is contained in:
MHSanaei 2026-04-20 20:03:40 +02:00
parent ca2fd3814f
commit a9d8905393
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A
2 changed files with 6 additions and 3 deletions

View file

@ -1 +1 @@
2.8.11
2.9.0

View file

@ -14,7 +14,6 @@ import (
const (
loginUserKey = "LOGIN_USER"
defaultPath = "/"
)
func init() {
@ -59,8 +58,12 @@ func IsLogin(c *gin.Context) bool {
func ClearSession(c *gin.Context) {
s := sessions.Default(c)
s.Clear()
cookiePath := c.GetString("base_path")
if cookiePath == "" {
cookiePath = "/"
}
s.Options(sessions.Options{
Path: defaultPath,
Path: cookiePath,
MaxAge: -1,
HttpOnly: true,
SameSite: http.SameSiteLaxMode,