Closed cwjohnston closed 4 years ago
How about something like this, immediately following the handler definition? Just an adaptation of from the linked documentation (with an Oxford comma).
This handler supports the use of the environment variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (or the lowercase versions thereof). HTTPS_PROXY takes precedence over HTTP_PROXY for https requests. The environment values may be either a complete URL or a "host[:port]", in which case the "http" scheme is assumed.
As the SDK provides an HTTP client built on net/http, handler plugins built with the SDK tend to honor HTTP proxy environment variables as documented in https://golang.org/pkg/net/http/#ProxyFromEnvironment — I’ve tested this with the sensu-slack-handler and sensu-pagerduty-handler plugins.
If the README template included a section summarizing the environment variables which can be used to configure plugins to use an HTTP proxy, I think it would be helpful for end users of the projects generated from this template repo.