security

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowPrivateOutboundFromEnv

func AllowPrivateOutboundFromEnv() bool

AllowPrivateOutboundFromEnv enables private-network outbound requests when explicitly requested.

func ValidateOutboundURL

func ValidateOutboundURL(raw string, opts OutboundURLOptions) (*url.URL, error)

ValidateOutboundURL validates outbound URLs before using them in HTTP clients.

Types

type OutboundURLOptions

type OutboundURLOptions struct {
	AllowHTTP           bool
	AllowPrivateNetwork bool
	AllowedHosts        map[string]struct{}
}

OutboundURLOptions defines validation rules for outbound HTTP destinations.