PermissionsPolicy
Builder for the Permissions-Policy HTTP header.
Usage
PermissionsPolicy()Default header value: geolocation=(), microphone=(), camera=()
Notes
* Directive helpers cover MDN features; use value(...) when you already have a ready-made header string. * Allowlists follow MDN syntax: (), *, self, src, or double-quoted origins; ()/none cannot be mixed with other tokens, and wildcard must stand alone. * Call helpers repeatedly without worrying about duplicates: each directive is unique and re-assigning it keeps the order of the most recent write.
Resources: - https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy - https://owasp.org/www-project-secure-headers/#permissions-policy - https://www.w3.org/TR/permissions-policy-1/
Parameter Attributes
header_name: str_directives: dict[str, str] = dict()_raw_value: str | None = None