Skip to content

Commit

Permalink
Merge pull request #34 from LightAPIs/login
Browse files Browse the repository at this point in the history
Fix the interaction of login status when multiple flare in the same domain
  • Loading branch information
soulteary authored Dec 6, 2023
2 parents e49b7f3 + 516e472 commit 4814a8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package auth

import (
"net/http"
"strconv"
"strings"
"time"

Expand All @@ -22,7 +23,7 @@ func RequestHandle(router *gin.Engine) {
// TODO: 剥离逻辑
// TODO:替换密钥为用户相关数据
store := cookie.NewStore([]byte("secret"))
router.Use(sessions.Sessions("flare", store))
router.Use(sessions.Sessions("flare_"+strconv.Itoa(FlareState.AppFlags.Port), store))

// 非离线模式注册路由
if !FlareState.AppFlags.DisableLoginMode {
Expand Down

0 comments on commit 4814a8f

Please sign in to comment.