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