forked from Mxmilu666/frp
fix(api): update comment for URL construction security
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user