test(identity): add isolated browser mail fixture
This commit is contained in:
1 parent
86f562f5b6
commit
24638d46d2
20 files changed
+885
-20
No files matched your search
@@ -137,10 +137,14 @@ func newSender(apiKey, from string, timeout time.Duration, endpoint string, now
|
||||
// settings follow the standard HTTPS_PROXY and NO_PROXY environment, as with
|
||||
// any Go HTTP client.
|
||||
func newHTTPClient(timeout time.Duration) *http.Client {
|
||||
return newHTTPClientWithProxy(timeout, http.ProxyFromEnvironment)
|
||||
}
|
||||
|
||||
func newHTTPClientWithProxy(timeout time.Duration, proxy func(*http.Request) (*url.URL, error)) *http.Client {
|
||||
protocols := new(http.Protocols)
|
||||
protocols.SetHTTP1(true)
|
||||
transport := &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
Proxy: proxy,
|
||||
DialContext: (&net.Dialer{Timeout: timeout}).DialContext,
|
||||
TLSClientConfig: &tls.Config{MinVersion: tls.VersionTLS12},
|
||||
TLSHandshakeTimeout: timeout,
|
||||
|
||||
Reference in new issue
Block a user