Skip to content

Commit 3efcdf5

Browse files
committed
fix(webapp): strip secure param from query ClickHouse URL
The `initializeQueryClickhouseClient()` function was missing the `url.searchParams.delete("secure")` call that the other two sibling ClickHouse client init functions already had. This caused a startup crash (`Error: Unknown URL parameters: secure`) when QUERY_CLICKHOUSE_URL fell back to CLICKHOUSE_URL which contains `?secure=false`. Fixes #3184
1 parent 436f20e commit 3efcdf5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Strip `secure` query parameter from QUERY_CLICKHOUSE_URL before passing to ClickHouse client. This was already done for the main and logs ClickHouse clients but was missing for the query client, causing a startup crash with `Error: Unknown URL parameters: secure`.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ function initializeQueryClickhouseClient() {
8383

8484
const url = new URL(env.QUERY_CLICKHOUSE_URL);
8585

86+
// Remove secure param
87+
url.searchParams.delete("secure");
88+
8689
return new ClickHouse({
8790
url: url.toString(),
8891
name: "query-clickhouse",

0 commit comments

Comments
 (0)