Permissions-Policy Syntax and Directives

Permissions-Policy Syntax and Directives

The Permissions-Policy header uses a structured syntax to control features:

Permissions-Policy: feature=(allowlist)

Common directives include:

Camera and Microphone Control

Permissions-Policy: camera=(), microphone=()

Geolocation Restrictions

Permissions-Policy: geolocation=(self "https://maps.example.com")

Payment API Control

Permissions-Policy: payment=(self)

Multiple Directives

Permissions-Policy: geolocation=(self), camera=(), microphone=(), payment=(self "https://payment.example.com")