mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-12 17:46:20 +08:00
fix: Fix log printing issues caused by container log tracking switches (#9552)
This commit is contained in:
parent
6b673017c5
commit
adce6103bd
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue