diff --git a/agent/i18n/lang/zh.yaml b/agent/i18n/lang/zh.yaml index cd9818d20..751a87114 100644 --- a/agent/i18n/lang/zh.yaml +++ b/agent/i18n/lang/zh.yaml @@ -265,6 +265,7 @@ sqlInject: 'SQL 注入' ErrDBNotExist: "数据库不存在" allow: "允许" deny: "禁止" +OpenrestyNotFound: "Openresty 未安装" #task TaskStart: "{{.name}} 任务开始 [START]" diff --git a/core/app/api/v2/auth.go b/core/app/api/v2/auth.go index 8c5417830..c493b9cc4 100644 --- a/core/app/api/v2/auth.go +++ b/core/app/api/v2/auth.go @@ -2,7 +2,6 @@ package v2 import ( "encoding/base64" - "github.com/1Panel-dev/1Panel/core/app/api/v2/helper" "github.com/1Panel-dev/1Panel/core/app/dto" "github.com/1Panel-dev/1Panel/core/app/model" diff --git a/core/app/service/setting.go b/core/app/service/setting.go index fa9e481c7..270ce090f 100644 --- a/core/app/service/setting.go +++ b/core/app/service/setting.go @@ -232,6 +232,7 @@ func (u *SettingService) UpdatePort(port uint) error { func (u *SettingService) UpdateSSL(c *gin.Context, req dto.SSLUpdate) error { secretDir := path.Join(global.CONF.Base.InstallDir, "1panel/secret") if req.SSL == constant.StatusDisable { + c.SetCookie(constant.SessionName, "", -1, "/", "", false, true) if err := settingRepo.Update("SSL", constant.StatusDisable); err != nil { return err } diff --git a/core/utils/common/common.go b/core/utils/common/common.go index 8919bb688..8b8e46031 100644 --- a/core/utils/common/common.go +++ b/core/utils/common/common.go @@ -2,9 +2,11 @@ package common import ( "fmt" + "github.com/1Panel-dev/1Panel/core/constant" "github.com/gin-gonic/gin" mathRand "math/rand" "net" + "net/http" "os" "path" "strconv" @@ -205,3 +207,14 @@ func HandleIPList(content string) ([]string, error) { } return res, nil } + +func deleteCookie(w http.ResponseWriter) { + cookie := &http.Cookie{ + Name: constant.SessionName, + Value: "", + Path: "/", + Expires: time.Unix(0, 0), + MaxAge: -1, + } + http.SetCookie(w, cookie) +} diff --git a/frontend/src/components/log/custom-hightlight/index.vue b/frontend/src/components/log/custom-hightlight/index.vue index f51eb2ec2..7be64aab8 100644 --- a/frontend/src/components/log/custom-hightlight/index.vue +++ b/frontend/src/components/log/custom-hightlight/index.vue @@ -89,7 +89,7 @@ const systemRules: TokenRule[] = [ const taskRules: TokenRule[] = [ { type: 'bracket-text', - pattern: /\[([^\,]]+)\]/g, + pattern: /\[([^\]]+)\]/g, color: '#B87A2B', }, ]; @@ -108,7 +108,7 @@ const defaultRules: TokenRule[] = [ }, { type: 'ip', - pattern: /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/g, + pattern: /\b(? { if (globalStore.entrance) { address = address.replaceAll('settings/safe', globalStore.entrance); } else { - address = address.replaceAll('settings/safe', 'login'); + address = address.replaceAll('settings/safe', ''); } setTimeout(() => { window.open(`https://${address}`, '_self');