http/origin_wildcard.ts view source
(origins: readonly RegExp[], allowed: boolean, origins_var?: string): Result<{ wildcards: OriginWildcardEntry[]; }, { message: string; }> import {admit_origin_wildcards} from '@fuzdev/fuz_app/http/origin_wildcard.js'; Admit origins' wildcard entries when allowed, returning what each admits
for the caller to warn with; an exact list passes either way with none.
Classifies the matchers parse_allowed_origins built (origin_pattern_of,
read through a realm-global brand, so a second fuz_app copy's matchers
classify too). A matcher built any other way can't be classified, so it is
refused whatever allowed says — build the list with
parse_allowed_origins.
origins
the allowlist's matchers
readonly RegExp[]allowed
whether the operator opted in (FUZ_ALLOW_ORIGIN_WILDCARDS=true)
booleanorigins_var?
what the list is called in the refusal: the env var it was read from, or the option that carried it
stringALLOWED_ORIGINS_VARreturns
Result
the wildcard entries admitted, or the refusal — naming each unclassifiable matcher, or else each wildcard entry, what it admits, and the flag (the Rust spine's boot error, word for word)