Documentation
¶
Overview ¶
Package netguard builds HTTP clients for user-configured outbound URLs (alert and deploy notification webhooks) that refuse to connect to loopback, private, link-local, or otherwise internal addresses.
Index ¶
Constants ¶
View Source
const AllowPrivateEnv = "APP_NOTIFY_ALLOW_PRIVATE_NETWORKS"
AllowPrivateEnv names the env var that, when true, lets outbound notification requests reach internal addresses (for example a self-hosted chat server on a private IP).
Variables ¶
View Source
var ErrBlockedAddress = errors.New("netguard: destination address is internal and not allowed")
ErrBlockedAddress is returned when a dial targets an internal address while AllowPrivateEnv is not enabled.
Functions ¶
func AllowPrivate ¶
func AllowPrivate() bool
AllowPrivate reports whether AllowPrivateEnv is set to a true value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.