Documentation
¶
Overview ¶
Package urlutil provides URL validation and integrity-hash utilities shared by config (agent entry validation) and harness (remote resource resolution) packages. It lives at the leaf of the import graph to avoid the config → harness circular dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchingAllowedPrefixInList ¶
MatchingAllowedPrefixInList checks if a URL matches any prefix in the given allowlist. Returns the matching prefix or "" if none match. Performs case-insensitive comparison with percent-decoding and dot-segment cleaning.
func NormalizeURLPath ¶
NormalizeURLPath parses a URL, percent-decodes and cleans its path, and returns the reconstructed URL string. Returns false if parsing fails.
func ParseIntegrityHash ¶
ParseIntegrityHash extracts the SHA256 hash from a URL fragment (#sha256=...). Returns the URL without the fragment, the hash value, and whether a valid hash was found. The hash is normalized to lowercase; both "sha256=ABC..." and "sha256=abc..." are accepted.
Types ¶
This section is empty.