Syntropy.Webhooks.UrlPolicy
(syntropy v0.3.0)
Copy Markdown
SSRF guard for outbound webhook destinations.
Resolves the destination host and rejects addresses that point at the gateway's own network: loopback, RFC1918 private ranges, link-local (including the 169.254.169.254 cloud metadata endpoint), CGNAT, IPv6 unique-local, and their IPv4-mapped IPv6 equivalents.
The guard is enforced twice: when a webhook is registered (fast feedback) and again before every delivery (protects against DNS rebinding). When the host cannot be resolved the policy allows the attempt — the HTTP client will record the resolution failure as a normal delivery error.
SYNTROPY_WEBHOOK_ALLOW_PRIVATE disables the guard for local development;
it defaults to true in dev/test and false in production.
Summary
Functions
Validate a webhook destination URL against the private-network policy.