MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / ShouldProxyToAgent

Function ShouldProxyToAgent

core/middleware/helper.go:5–13  ·  view source on GitHub ↗
(reqPath string)

Source from the content-addressed store, hash-verified

3import "strings"
4
5func ShouldProxyToAgent(reqPath string) bool {
6 if strings.HasPrefix(reqPath, "/1panel/swagger") || !strings.HasPrefix(reqPath, "/api/v2") {
7 return false
8 }
9 if strings.HasPrefix(reqPath, "/api/v2/core") && !strings.HasPrefix(reqPath, "/api/v2/core/xpack") {
10 return false
11 }
12 return true
13}

Callers 1

OperationLogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected