Skip to content

Commit 3f2b748

Browse files
authored
Delete the secure param before passing it to the ClickHouse client (#2161)
1 parent a060cee commit 3f2b748

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

apps/webapp/app/services/clickhouseInstance.server.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ function initializeClickhouseClient() {
1010
return;
1111
}
1212

13-
console.log("🗃️ Clickhouse service enabled");
13+
const url = new URL(env.CLICKHOUSE_URL);
14+
15+
// Remove secure param
16+
url.searchParams.delete("secure");
17+
18+
console.log(`🗃️ Clickhouse service enabled to host ${url.host}`);
1419

1520
const clickhouse = new ClickHouse({
16-
url: env.CLICKHOUSE_URL,
21+
url: url.toString(),
1722
name: "clickhouse-instance",
1823
keepAlive: {
1924
enabled: env.CLICKHOUSE_KEEP_ALIVE_ENABLED === "1",

0 commit comments

Comments
 (0)