diff --git a/options.go b/options.go index 8ba74ccd1..19beeaa34 100644 --- a/options.go +++ b/options.go @@ -487,6 +487,9 @@ func setupConnParams(u *url.URL, o *Options) (*Options, error) { if q.err != nil { return nil, q.err } + if o.TLSConfig != nil && q.has("skip_verify") { + o.TLSConfig.InsecureSkipVerify = q.bool("skip_verify") + } // any parameters left? if r := q.remaining(); len(r) > 0 { diff --git a/options_test.go b/options_test.go index 1db36fdb4..d46ecc858 100644 --- a/options_test.go +++ b/options_test.go @@ -30,6 +30,9 @@ func TestParseURL(t *testing.T) { }, { url: "rediss://localhost:123", o: &Options{Addr: "localhost:123", TLSConfig: &tls.Config{ /* no deep comparison */ }}, + }, { + url: "rediss://localhost:123/?skip_verify=true", + o: &Options{Addr: "localhost:123", TLSConfig: &tls.Config{InsecureSkipVerify: true}}, }, { url: "redis://:bar@localhost:123", o: &Options{Addr: "localhost:123", Password: "bar"},