Skip to content

Commit

Permalink
Fix the custom agent http.request condition
Browse files Browse the repository at this point in the history
  • Loading branch information
slvrtrn committed Nov 14, 2024
1 parent 5346b28 commit 1cbd77a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class NodeCustomAgentConnection extends NodeBaseConnection {
super(params, params.http_agent)

// See https://github.com/ClickHouse/clickhouse-js/issues/352
if (params.http_agent instanceof Https.Agent) {
if (params.url.protocol.startsWith('https')) {
this.httpRequestFn = Https.request
} else {
this.httpRequestFn = Http.request
Expand Down

0 comments on commit 1cbd77a

Please sign in to comment.