Skip to content

Commit

Permalink
proxy support for outgoing requests (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesoreyeram authored Oct 5, 2021
1 parent 7e6596e commit e33f42b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Change history of the project. All the feature updates, bug fixes, breaking changes will be documented here.

## [ 0.7.10 ]

- proxy support for outgoing requests

## [ 0.7.9 ]

- Ability to customize timeout
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grafana-infinity-datasource",
"version": "0.7.9",
"version": "0.7.10",
"description": "JSON, CSV, XML, GraphQL & HTML datasource for Grafana. Do infinite things with Grafana.",
"main": "dist/module.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions pkg/infinity/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func NewClient(settings InfinitySettings) (client *Client, err error) {
return nil, err
}
transport := &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: tlsConfig,
}
httpClient := &http.Client{
Expand Down
6 changes: 6 additions & 0 deletions src/wiki/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ This datasource can work out of the box without any additional configuration. If
> If you specify the URL as `https://example.com/path` in your datasource config and `/my-endpoint` as your url in the query, then the final URL will be `https://example.com/path/my-endpoint`
More details about the URL and related settings can be found in [url](/wiki/url) page

## Proxy outgoing requests

If you want your datasource to connect via proxy, set the environment appropriate environment variables. HTTP_PROXY, HTTPS_PROXY and NO_PROXY. HTTPS_PROXY takes precedence over HTTP_PROXY for https requests.

> proxy support is available from v0.7.10

1 comment on commit e33f42b

@vercel
Copy link

@vercel vercel bot commented on e33f42b Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.