Skip to content

Function: parseAllowedUrls()

parseAllowedUrls(raw): string[]

Parse a raw allow-list from config (string[]) or an env var (a CSV / whitespace-separated string) into a normalized, de-duplicated entry list. Entries are trimmed and scheme-stripped; empties are dropped. Mirrors the email add-on’s parseAllowedSenders so the two policies read their config identically.

string | string[] | undefined

string[]