Documentation
¶
Overview ¶
Package browser provides browser automation utilities including URL allowlist enforcement for sandboxed browser plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allowlist ¶
type Allowlist struct {
// contains filtered or unexported fields
}
Allowlist enforces domain restrictions on browser navigation. A nil or empty Allowlist permits all domains (except blocked ranges).
func NewAllowlist ¶
NewAllowlist creates an Allowlist from a list of domain patterns. Supports exact matches ("github.com") and wildcard subdomains ("*.example.com"). An empty list means unrestricted (all non-blocked domains are allowed).
func (*Allowlist) Allowed ¶
Allowed checks whether a URL is permitted by the allowlist. Returns false if the URL's host matches a blocked range (link-local, metadata endpoints) regardless of the allowlist. If the allowlist is empty, all non-blocked URLs are allowed.