Skip to content

Commit

Permalink
Merge pull request #349 from carlanton/fix-backend-basic-auth
Browse files Browse the repository at this point in the history
Fix basic auth for alerts
  • Loading branch information
Slach authored Jun 4, 2021
2 parents 7449aac + 9c4a4d2 commit 990fdd5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func (client *ClickHouseClient) Query(query string) (*Response, error) {

if client.settings.Instance.BasicAuthEnabled {
password, _ := client.settings.Instance.DecryptedSecureJSONData["basicAuthPassword"]
req.SetBasicAuth(client.settings.Instance.BasicAuthUser, password)
req.Header.Set("X-ClickHouse-User", client.settings.Instance.BasicAuthUser)
req.Header.Set("X-ClickHouse-Key", password)
} else if client.settings.UseYandexCloudAuthorization {
Expand Down

0 comments on commit 990fdd5

Please sign in to comment.