v5.0.74: fresh Transport (not cloned DefaultTransport)
This commit is contained in:
@@ -2,7 +2,7 @@ terraform {
|
||||
required_providers {
|
||||
nubes = {
|
||||
source = "terra.k8c.ru/nubes-test/nubes"
|
||||
version = "5.0.73"
|
||||
version = "5.0.74"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,15 +120,20 @@ func (p *NubesProvider) Configure(ctx context.Context, req provider.ConfigureReq
|
||||
insecureSkipVerify = true
|
||||
}
|
||||
|
||||
// HTTP transport: клонируем DefaultTransport чтобы сохранить системные настройки (proxy, timeouts).
|
||||
transport := http.DefaultTransport.(*http.Transport).Clone()
|
||||
transport.TLSHandshakeTimeout = 60 * time.Second
|
||||
// Отключаем HTTP/2: ColdFusion + DDoS-Guard не поддерживают h2 → EOF.
|
||||
// Пустой TLSNextProto убирает h2 из ALPN → только HTTP/1.1.
|
||||
transport.TLSNextProto = make(map[string]func(authority string, c *tls.Conn) http.RoundTripper)
|
||||
transport.TLSClientConfig = &tls.Config{
|
||||
InsecureSkipVerify: insecureSkipVerify,
|
||||
MinVersion: tls.VersionTLS12,
|
||||
transport := &http.Transport{
|
||||
DialContext: (&net.Dialer{
|
||||
Timeout: 30 * time.Second,
|
||||
KeepAlive: 30 * time.Second,
|
||||
}).DialContext,
|
||||
TLSHandshakeTimeout: 60 * time.Second,
|
||||
ResponseHeaderTimeout: 60 * time.Second,
|
||||
MaxIdleConnsPerHost: 10,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
TLSNextProto: make(map[string]func(authority string, c *tls.Conn) http.RoundTripper),
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: insecureSkipVerify,
|
||||
MinVersion: tls.VersionTLS12,
|
||||
},
|
||||
}
|
||||
|
||||
// Определяем уровень логирования операций: none (тихий) / info / debug.
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
version string = "5.0.73"
|
||||
version string = "5.0.74"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user