From 97ea19ed1bce596bbf11c078e08de3fb333b1463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Wed, 1 Jul 2026 15:41:38 +0400 Subject: [PATCH] v5.0.69: ?endpoint= format like generator (fixes POST 403) --- TEST_STAND/buck0/main.tf | 2 +- universal_rebuild/internal/core/client.go | 7 ++++++- universal_rebuild/main.go | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/TEST_STAND/buck0/main.tf b/TEST_STAND/buck0/main.tf index a772615..8da875a 100644 --- a/TEST_STAND/buck0/main.tf +++ b/TEST_STAND/buck0/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { nubes = { source = "terra.k8c.ru/nubes-test/nubes" - version = "5.0.68" + version = "5.0.69" } } } diff --git a/universal_rebuild/internal/core/client.go b/universal_rebuild/internal/core/client.go index 0a950ac..85082d8 100644 --- a/universal_rebuild/internal/core/client.go +++ b/universal_rebuild/internal/core/client.go @@ -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") diff --git a/universal_rebuild/main.go b/universal_rebuild/main.go index e4f8b96..e1f07e9 100644 --- a/universal_rebuild/main.go +++ b/universal_rebuild/main.go @@ -10,7 +10,7 @@ import ( ) var ( - version string = "5.0.68" + version string = "5.0.69" ) func main() {