security

package
v0.11.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateOutboundURL

func ValidateOutboundURL(rawURL string, opts OutboundURLOptions) error

ValidateOutboundURL validates that a URL is safe for outbound provider requests. It rejects unsafe schemes and local-network targets unless explicitly allowed.

Types

type OutboundURLOptions

type OutboundURLOptions struct {
	// AllowHTTP permits plain HTTP URLs. HTTPS is always allowed.
	AllowHTTP bool
	// AllowLocalNetworks permits loopback/private/link-local IP targets and localhost hostnames.
	AllowLocalNetworks bool
}

OutboundURLOptions configures outbound request URL validation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL