v5.0.69: ?endpoint= format like generator (fixes POST 403)

This commit is contained in:
“Naeel”
2026-07-01 15:41:38 +04:00
parent 7862ea7e45
commit 97ea19ed1b
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ terraform {
required_providers {
nubes = {
source = "terra.k8c.ru/nubes-test/nubes"
version = "5.0.68"
version = "5.0.69"
}
}
}
+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= формат — как генератор (Python) и curl
q := req.URL.Query()
q.Set("endpoint", path)
req.URL.RawQuery = q.Encode()
req.Header.Set("User-Agent", userAgent)
if body != nil {
req.Header.Set("Content-Type", "application/json")
+1 -1
View File
@@ -10,7 +10,7 @@ import (
)
var (
version string = "5.0.68"
version string = "5.0.69"
)
func main() {