mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Merge pull request #56638 from chhetripradeep/pchhetri/enable-secure-flag-for-clickhouse-cloud
Enable --secure flag for clickhouse-client for hostnames pointing to clickhouse cloud
This commit is contained in:
commit
9bceafbf9e
@ -30,7 +30,8 @@ ConnectionParameters::ConnectionParameters(const Poco::Util::AbstractConfigurati
|
||||
, port(connection_port.value_or(getPortFromConfig(config)))
|
||||
{
|
||||
bool is_secure = config.getBool("secure", false);
|
||||
security = is_secure ? Protocol::Secure::Enable : Protocol::Secure::Disable;
|
||||
bool is_clickhouse_cloud = connection_host.ends_with(".clickhouse.cloud") || connection_host.ends_with(".clickhouse-staging.com");
|
||||
security = (is_secure || is_clickhouse_cloud) ? Protocol::Secure::Enable : Protocol::Secure::Disable;
|
||||
|
||||
default_database = config.getString("database", "");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user