mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-11 21:06:08 +08:00
fix: Fix the issue of abnormal parsing of Chinese nodes (#8790)
This commit is contained in:
parent
fe6c2a2c76
commit
38a668fbeb
1 changed files with 3 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -32,7 +33,8 @@ func OperationLog() gin.HandlerFunc {
|
||||||
source := loadLogInfo(c.Request.URL.Path)
|
source := loadLogInfo(c.Request.URL.Path)
|
||||||
pathItem := strings.TrimPrefix(c.Request.URL.Path, "/api/v2")
|
pathItem := strings.TrimPrefix(c.Request.URL.Path, "/api/v2")
|
||||||
pathItem = strings.TrimPrefix(pathItem, "/api/v2/core")
|
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{
|
record := &model.OperationLog{
|
||||||
Source: source,
|
Source: source,
|
||||||
Node: currentNode,
|
Node: currentNode,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue