Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultSSRFValidator ¶
type DefaultSSRFValidator struct{}
DefaultSSRFValidator implements SSRFValidator with full SSRF protection.
func NewDefaultSSRFValidator ¶
func NewDefaultSSRFValidator() *DefaultSSRFValidator
NewDefaultSSRFValidator creates a new DefaultSSRFValidator.
func (*DefaultSSRFValidator) ValidateExternalURL ¶
func (v *DefaultSSRFValidator) ValidateExternalURL(ctx context.Context, rawURL string) error
ValidateExternalURL validates that a URL is safe for external HTTP requests. It performs the following checks: 1. URL format is valid 2. Scheme is http or https only 3. Hostname is not localhost or variations 4. Domain name follows DNS naming conventions 5. All resolved IPs are not in private/reserved ranges.
Click to show internal directories.
Click to hide internal directories.