feat(client): Added client configuration option for using a custom DNS resolver (#284)

This commit is contained in:
Andre Bindewald authored and GitHub committed 2022-06-12 18:45:08 -04:00
1 parent f23fcbedb8
commit 2cbb35fe3b
3 files changed
+128 -1

No files matched your search

+12
View File
@@ -282,6 +282,7 @@ the client used to send the request.
| `client.insecure` | Whether to skip verifying the server's certificate chain and host name. | `false` |
| `client.ignore-redirect` | Whether to ignore redirects (true) or follow them (false, default). | `false` |
| `client.timeout` | Duration before timing out. | `10s` |
| `client.dns-resolver` | Override the DNS resolver using the format `{proto}://{host}:{port}`. | `""` |
| `client.oauth2` | OAuth2 client configuration. | `{}` |
| `client.oauth2.token-url` | The token endpoint URL | required `""` |
| `client.oauth2.client-id` | The client id which should be used for the `Client credentials flow` | required `""` |
@@ -313,6 +314,17 @@ endpoints:
- "[STATUS] == 200"
```
This example shows how you can use a `custom DNS Resolver`:
```yaml
endpoints:
- name: website
url: "https://your.health.api/getHealth"
client:
dns-resolver: "tcp://1.1.1.1:53"
conditions:
- "[STATUS] == 200"
```
This example shows how you can use the `client.oauth2` configuration to query a backend API with `Bearer token`:
```yaml
endpoints: