Skip to main content

Module utils

Module utils 

Source
Expand description

URL validation utilities for storage backends.

This module provides security-focused URL validation functions used by HTTP and S3 storage backends to prevent SSRF (Server-Side Request Forgery) attacks. It detects and blocks access to internal networks, loopback addresses, and cloud metadata endpoints.

Functionsยง

is_restricted_ip
Checks if an IP address belongs to a restricted range.
validate_url
Validates and sanitizes a URL for safe remote access.