Documentation
¶
Overview ¶
Package networkpolicy provides the outbound HTTP transport used for user-configured destinations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDisallowedURL = errors.New("URL must resolve to an allowed address")
)
Functions ¶
func AllowsLocalhostDevelopment ¶
AllowsLocalhostDevelopment reports whether publicURL explicitly configures a localhost HTTP development instance.
func SameOrigin ¶
SameOrigin compares URL scheme, hostname, and effective port.
Types ¶
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
Policy validates URLs and supplies clients backed by one shared transport.
func New ¶
New constructs an outbound policy. allowLocalhost is only for development instances whose configured public URL is itself localhost.
Click to show internal directories.
Click to hide internal directories.