normalizeHost
normalizeHost(
raw):string|null
Defined in: src/egress.ts:340
Trim + lowercase a host and accept it ONLY if it is a syntactically valid hostname (RFC-1123-ish: ≥2 dot-separated labels, no leading/trailing hyphen, no empty labels). Returns the normalized host, or null to reject.
This is the SINGLE gate for what may enter the egress allowlist. validate.ts
reuses it so a host that passes repo-config validation is exactly a host that
will make the allowlist — no “persisted but silently dropped at spawn” skew.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | null