Skip to content

Commit 3a49215

Browse files
Setting X-Clickhouse-SSL-Certificate-Auth off when password is set, and setting it to on otherwise (#1316)
1 parent 7127f98 commit 3a49215

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

conn_http.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ func dialHttp(ctx context.Context, addr string, num int, opt *Options) (*httpCon
166166
headers["X-ClickHouse-User"] = opt.Auth.Username
167167
if len(opt.Auth.Password) > 0 {
168168
headers["X-ClickHouse-Key"] = opt.Auth.Password
169+
headers["X-ClickHouse-SSL-Certificate-Auth"] = "off"
170+
} else {
171+
headers["X-ClickHouse-SSL-Certificate-Auth"] = "on"
169172
}
170173
}
171174

0 commit comments

Comments
 (0)