From adce6103bddea110cf84faed22bb53b3552d6c6c Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:51:23 +0800 Subject: [PATCH] fix: Fix log printing issues caused by container log tracking switches (#9552) --- core/init/router/proxy.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/init/router/proxy.go b/core/init/router/proxy.go index 4c9f2924b..a05fada8a 100644 --- a/core/init/router/proxy.go +++ b/core/init/router/proxy.go @@ -1,13 +1,14 @@ package router import ( - "github.com/1Panel-dev/1Panel/core/init/proxy" "net/http" "net/url" "os" "strconv" "strings" + "github.com/1Panel-dev/1Panel/core/init/proxy" + "github.com/1Panel-dev/1Panel/core/app/api/v2/helper" "github.com/1Panel-dev/1Panel/core/app/repo" "github.com/1Panel-dev/1Panel/core/cmd/server/res" @@ -56,6 +57,11 @@ func Proxy() gin.HandlerFunc { helper.ErrorWithDetail(c, http.StatusBadRequest, "ErrProxy", err) return } + defer func() { + if err := recover(); err != nil && err != http.ErrAbortHandler { + global.LOG.Debug(err) + } + }() proxy.LocalAgentProxy.ServeHTTP(c.Writer, c.Request) c.Abort() return