fix: Fix the issue of abnormal parsing of Chinese nodes (#8790)

This commit is contained in:
ssongliu 2025-05-23 14:46:15 +08:00 committed by GitHub
parent fe6c2a2c76
commit 38a668fbeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,7 @@ import (
"fmt"
"io"
"net/http"
"net/url"
"path"
"reflect"
"strings"
@ -32,7 +33,8 @@ func OperationLog() gin.HandlerFunc {
source := loadLogInfo(c.Request.URL.Path)
pathItem := strings.TrimPrefix(c.Request.URL.Path, "/api/v2")
pathItem = strings.TrimPrefix(pathItem, "/api/v2/core")
currentNode := c.Request.Header.Get("CurrentNode")
currentNodeItem := c.Request.Header.Get("CurrentNode")
currentNode, _ := url.QueryUnescape(currentNodeItem)
record := &model.OperationLog{
Source: source,
Node: currentNode,