Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalOriginEndpoint ¶ added in v0.7.0
CanonicalOriginEndpoint validates a configured service endpoint as exactly one HTTP(S) origin. Paths, credentials, queries, and fragments are rejected so later SDK URL construction cannot silently broaden authority.
func IsPolicyError ¶
Types ¶
type Policy ¶
type Policy struct {
Timeout time.Duration
MaxRedirects int
DisableRedirects bool
AllowPrivateNetwork bool
AllowedPrivateOrigins []string
// AllowedOrigins restricts every request and redirect to one of these exact
// canonical origins. It is independent from private-network permission.
AllowedOrigins []string
DisableCompression bool
LookupNetIP func(context.Context, string, string) ([]netip.Addr, error)
DialContext func(context.Context, string, string) (net.Conn, error)
TLSClientConfig *tls.Config
ConnectTimeout time.Duration
TLSHandshakeTimeout time.Duration
ResponseHeaderTimeout time.Duration
}
type PolicyError ¶
type PolicyError struct {
Reason string
}
func (*PolicyError) Error ¶
func (e *PolicyError) Error() string
Click to show internal directories.
Click to hide internal directories.