mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
Other: Disable TLS pin checks on QA builds
This commit is contained in:
@ -56,6 +56,13 @@ func withBridge( //nolint:funlen
|
||||
cookieJar http.CookieJar,
|
||||
fn func(*bridge.Bridge, <-chan events.Event) error,
|
||||
) error {
|
||||
// Delete old go-imap cache files
|
||||
if deleteOldGoIMAPFiles {
|
||||
if err := locations.CleanGoIMAPCache(); err != nil {
|
||||
logrus.WithError(err).Error("Failed to remove old go-imap cache")
|
||||
}
|
||||
}
|
||||
|
||||
// Create the underlying dialer used by the bridge.
|
||||
// It only connects to trusted servers and reports any untrusted servers it finds.
|
||||
pinningDialer := dialer.NewPinningTLSDialer(
|
||||
@ -64,13 +71,6 @@ func withBridge( //nolint:funlen
|
||||
dialer.NewTLSPinChecker(dialer.TrustedAPIPins),
|
||||
)
|
||||
|
||||
// Delete old go-imap cache files
|
||||
if deleteOldGoIMAPFiles {
|
||||
if err := locations.CleanGoIMAPCache(); err != nil {
|
||||
logrus.WithError(err).Error("Failed to remove old go-imap cache")
|
||||
}
|
||||
}
|
||||
|
||||
// Create a proxy dialer which switches to a proxy if the request fails.
|
||||
proxyDialer := dialer.NewProxyTLSDialer(pinningDialer, constants.APIHost)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user