v5.0.58: fix API format — ?endpoint= instead of REST path (DDoS-Guard 403)

This commit is contained in:
“Naeel”
2026-07-01 14:28:08 +04:00
parent 9c78cba1a0
commit d2b9e91624
19 changed files with 50 additions and 577 deletions
+6 -1
View File
@@ -828,11 +828,16 @@ func (c *UniversalClient) doRequest(ctx context.Context, method, path string, pa
body = bytes.NewBuffer(b)
}
req, err := http.NewRequestWithContext(ctx, method, c.ApiEndpoint+path, body)
req, err := http.NewRequestWithContext(ctx, method, c.ApiEndpoint, body)
if err != nil {
return nil, nil, err
}
// ?endpoint= формат — как генератор, чтобы пройти DDoS-Guard
q := req.URL.Query()
q.Set("endpoint", path)
req.URL.RawQuery = q.Encode()
req.Close = true
req.Header.Set("Content-Type", "application/json")
req.Header.Set("User-Agent", userAgent)
+1 -1
View File
@@ -10,7 +10,7 @@ import (
)
var (
version string = "5.0.57"
version string = "5.0.58"
)
func main() {