diff --git a/connector.go b/connector.go index 96a88319..e29b1d96 100644 --- a/connector.go +++ b/connector.go @@ -2,6 +2,7 @@ package dbsql import ( "context" + "crypto/tls" "database/sql/driver" "fmt" "net/http" @@ -107,6 +108,13 @@ func withUserConfig(ucfg config.UserConfig) connOption { } } +// WithServerHostname sets up the server hostname. Mandatory. +func WithSkipInsecureSkipVerify(host string) connOption { + return func(c *config.Config) { + c.TLSConfig = &tls.Config{InsecureSkipVerify: true} + } +} + // WithServerHostname sets up the server hostname. Mandatory. func WithServerHostname(host string) connOption { return func(c *config.Config) {