Skip to content

Commit 95248d8

Browse files
committed
X-auth added
1 parent 1ac330b commit 95248d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ClickHouseAPI.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,9 @@ public function yiDoApiCall($api_url,
559559
\curl_setopt($curl_h, \CURLOPT_POST, true);
560560
\curl_setopt($curl_h, \CURLOPT_POSTFIELDS, $post_data);
561561
}
562+
562563
// No Auth in $h_params ? Try alternative
564+
if(empty($h_params['user']) && !empty($this->user)) {
563565
\curl_setopt($curl_h, \CURLOPT_HTTPHEADER, [
564566
'X-ClickHouse-User: ' . $this->user,
565567
'X-ClickHouse-Key: ' . $this->pass,

0 commit comments

Comments
 (0)