fix(api): update comment for URL construction security

This commit is contained in:
2026-01-11 04:05:27 +08:00
parent 4eb4b202c5
commit f386996928

View File

@@ -224,8 +224,8 @@ func runClientWithToken(token string, unsafeFeatures *security.UnsafeFeatures) e
} }
// Fetch config from API // Fetch config from API
// #nosec G107 -- URL is constructed from trusted source (environment variable or hardcoded)
url := fmt.Sprintf("%s/api/v1/tunnel/frpc/config/%s", apiServer, token) url := fmt.Sprintf("%s/api/v1/tunnel/frpc/config/%s", apiServer, token)
// #nosec G107 -- URL is constructed from trusted source (environment variable or hardcoded)
resp, err := http.Get(url) resp, err := http.Get(url)
if err != nil { if err != nil {
return fmt.Errorf("failed to fetch config from API: %v", err) return fmt.Errorf("failed to fetch config from API: %v", err)