docs: add a name mnemonic to every module README and the root modules table

This commit is contained in:
2026-10-11 00:26:20 +02:00
parent 5e3c552aa1
commit ca1443e9c8
25 changed files with 74 additions and 26 deletions

View File

@@ -4,6 +4,8 @@ Guarded outbound HTTP client and fetcher that blocks private and reserved addres
`import "git.golem15.com/golem15/summercms/modules/fetchguard"`
**Name:** A lifeguard for outbound fetches; it watches every request the application sends out and stops the dangerous ones.
## Overview
`fetchguard` is the framework's server-side request forgery guard for fetching URLs that come from users or third parties, such as a remote image address. Every call takes a `fetchguard.Policy` that either restricts the target to an allow list of hosts or permits any public host; in both modes the dial-time check refuses private, loopback, link-local, carrier-grade NAT, documentation, multicast and other reserved IPv4 and IPv6 ranges, including IPv4 embedded in NAT64 and 6to4 addresses. Failures come back as a `fetchguard.Error` carrying one `fetchguard.Reason` from a closed set, so callers can map them onto stable API error codes. WinterCMS has no dedicated counterpart; plugins there typically used Guzzle with hand-written checks.