-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How should we skip ssl verification for self-certification? #1019
Labels
Comments
yes - like this // Keep TLS config.
tlsConfig := &tls.Config{}
if config.Insecure {
tlsConfig.InsecureSkipVerify = true
}
var transport http.RoundTripper = &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).DialContext,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
TLSClientConfig: tlsConfig,
// Set this value so that the underlying transport round-tripper
// doesn't try to auto decode the body of objects with
// content-encoding set to `gzip`.
//
// Refer:
// https://golang.org/src/net/http/transport.go?h=roundTrip#L1843
DisableCompression: true,
}
// Set custom transport.
api.SetCustomTransport(transport) |
@harshavardhana Thank you for quick response. It worked! |
I came here for the solution (thanks, @harshavardhana), and also found an even shorter way to just skip certificate validation: api.SetCustomTransport(&http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}) |
kkellerlbl
added a commit
to kkellerlbl/blobstore
that referenced
this issue
Dec 8, 2020
NewWithRegion doesn't seem to like the (url, &minio.Options) call. Try using the older (documented) style with this for setting a custom transport: minio/minio-go#1019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kind: question
Server: minio
Certificate: self-certificate
Description:
I am trying to access minio server with minio-go, but it fails due to unknown authority.
Is there any way to set something like
--skip-ssl-verification
like minio client, which has--insecure
option for skip ssl verification.The text was updated successfully, but these errors were encountered: