Skip to main content

parse_namespace_allowlist

Function parse_namespace_allowlist 

Source
pub fn parse_namespace_allowlist(
    text: &str,
) -> Result<BTreeSet<Namespace>, String>
Expand description

Parse a namespace allowlist file (the native --namespace-allowlist file and the Worker NAMESPACE_ALLOWLIST var): namespaces separated by newlines or commas, each in its canonical form (ed25519-<64 hex> or 0x<40 hex>). # starts a comment that runs to the end of its line; blank entries are ignored. The file is security configuration, not a secret.

§Errors

A message naming the 1-based line of the first malformed or duplicate entry, and “namespace allowlist contains no namespaces” when nothing parses.