Enforces registry origin policy for packuments and tarballs.
Registry and mirror confusion can move package metadata or tarballs to an unexpected host. The default policy allows the configured registry and mirror origins, blocks cross-origin redirects, and rejects tarball URLs outside the allowlist.
Summary
Functions
Return normalized allowed registry origins.
Return the normalized scheme://host[:port] origin for a URL.
Validate that a URL belongs to an allowed registry origin.