Skip to content

Commit 439f704

Browse files
authored
Merge pull request #55 from VictoriaMetrics/issue-54
fix issue with forwarding headers
2 parents d6bfe49 + 3183e7e commit 439f704

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## tip
44

5+
* BUGFIX: fix issue with forwarding headers from datasource to the backend or proxy.
6+
It might be helpful if a user wants to use some kind of authentication. See [this issue](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/54)
7+
58
## v0.2.5
69

710
* BUGFIX: fix bug with parsing response when time field is empty but message and labels are present.

pkg/plugin/datasource.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ func NewDatasource(ctx context.Context, settings backend.DataSourceInstanceSetti
2323
if err != nil {
2424
return nil, fmt.Errorf("error create httpclient.Options based on settings: %w", err)
2525
}
26+
opts.ForwardHTTPHeaders = true
27+
2628
cl, err := httpclient.New(opts)
2729
if err != nil {
2830
return nil, fmt.Errorf("error create a new http.Client: %w", err)

0 commit comments

Comments
 (0)