mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 07:36:44 +00:00
GODT-2181: Add env proxy support for integration tests.
This commit is contained in:
@ -18,6 +18,8 @@
|
|||||||
package tests
|
package tests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
@ -72,7 +74,13 @@ func newLiveAPI(hostURL string) API {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &liveAPI{
|
return &liveAPI{
|
||||||
Server: server.New(server.WithProxyOrigin(hostURL)),
|
Server: server.New(
|
||||||
|
server.WithProxyOrigin(hostURL),
|
||||||
|
server.WithProxyTransport(&http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
}),
|
||||||
|
),
|
||||||
domain: url.Hostname(),
|
domain: url.Hostname(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user