Skip to main content

Module allowed_origins

Module allowed_origins 

Source
Expand description

The sites an agent’s browser pane may go to, when the agent limited it with OpenBrowser({allowed_origins}) (docs/specs/SPEC_BROWSER_PANE_ALLOWED_ORIGINS_2026_10_09.md §2).

Shared by srv, which checks the list it is given and re-checks every request, and the CEF host, which stops a navigation off the list before it happens. A list is kept in its normal form (parse): https://example.com, https://*.example.com, http://localhost:3000.

Constants§

MAX_ENTRIES
Most entries one pane’s list may have.

Functions§

allows
May a pane limited to list (normal form) go to url? about: pages always; any other address with no web origin, never.
parse
entry in its normal form, or why it isn’t a valid entry:
parse_list
Parse every entry of entries, deduplicated, in order. Fails on the first bad entry, or past MAX_ENTRIES.
target_origin
The origin a navigation to url goes to, as an entry would name it exactly (a blob: URL’s is the origin it belongs to). None for an address with no such origin (about:, data:).