Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-04-20 21:03:40 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-04-20 22:43:49 +0300
commita9d890539389e52c4d824ead53555dd523b61e01 (patch)
tree3f0c8564dbb677c6a5ee07bd998e5c1b25c77c83
parentca2fd3814f484638c02a796ad5a298c2f883e14f (diff)
v2.9.0v2.9.0
-rw-r--r--config/version2
-rw-r--r--web/session/session.go7
2 files changed, 6 insertions, 3 deletions
diff --git a/config/version b/config/version
index 05822b7e..f3ac133c 100644
--- a/config/version
+++ b/config/version
@@ -1 +1 @@
-2.8.11 \ No newline at end of file
+2.9.0 \ No newline at end of file
diff --git a/web/session/session.go b/web/session/session.go
index 95b85227..9f7cedde 100644
--- a/web/session/session.go
+++ b/web/session/session.go
@@ -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,