Skip to content

Commit 247f322

Browse files
authored
Merge pull request #1719 from ClickHouse/fix_endpoint_ssl_detect
Add in addEndpoint detection of SSL from URL string
2 parents 287919a + b422833 commit 247f322

File tree

1 file changed

+3
-0
lines changed
  • client-v2/src/main/java/com/clickhouse/client/api

1 file changed

+3
-0
lines changed

client-v2/src/main/java/com/clickhouse/client/api/Client.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ public Builder addEndpoint(String endpoint) {
177177
} catch (java.net.MalformedURLException e) {
178178
throw new IllegalArgumentException("Endpoint should be a valid URL string", e);
179179
}
180+
if (endpoint.startsWith("https://")) {
181+
this.configuration.put(ClickHouseClientOption.SSL.getKey(), "true");
182+
}
180183
this.endpoints.add(endpoint);
181184
return this;
182185
}

0 commit comments

Comments
 (0)