Created
July 21, 2016 18:16
-
-
Save kelseyhightower/0eb7fb9d2be6fd2717cff5c7475c4a3e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
certPool, err := gocertifi.CACerts() | |
if err != nil { | |
log.Fatal(err) | |
} | |
c := http.Client{ | |
Timeout: 10 * time.Second, | |
Transport: &http.Transport{ | |
TLSClientConfig: &tls.Config{RootCAs: certPool}, | |
}, | |
} | |
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{RootCAs: certPool} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment