Permissions-Policy header - HTTP | MDN
Skip to search
Permissions-Policy header
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
See full compatibility
Report feedback
Experimental:
This is an
experimental technology
Check the
Browser compatibility table
carefully before using this in production.
The HTTP
Permissions-Policy
response header
provides a mechanism to allow and deny the use of browser features in a document or within any
# Single directive with reporting endpoint
Permissions-Policy:
# Multiple directives, with and without server reporting endpoints
Permissions-Policy:
The header can be used to set the allowlists for one or more directives, and optionally a per-directive
report-to
parameter indicating the server endpoint to send policy violation reports to.
The entries for each directive are comma separated.
The Permissions Policy directive to apply the
allowlist
to. See
Directives
below for a list of the permitted directive names.
An allowlist is a list of origins that takes one or more of the following values contained in parentheses, separated by spaces:
(wildcard)
The feature will be allowed in this document, and all nested browsing contexts (
Permissions-Policy: picture-in-picture=()
Permissions-Policy: geolocation=(self https://example.com/)
Permissions-Policy: camera=*
iframes
For an
to have a feature enabled its allowed origin must also be in the allowlist for the parent page. Because of this
inheritance behavior
, it is a good idea to specify the widest acceptable support for a feature in the HTTP header, and then specify the subset of support you need in each
To allow all origins access to geolocation, you would do this:
html
To apply a policy to the current origin and others, you'd do this:
html
allow="geolocation 'self' https://a.example.com https://b.example.com">
This is important: By default, if an
navigates to another origin, the policy is not applied to the origin that the
navigates to. By listing the origin that the
navigates to in the
allow
attribute, the Permissions Policy that was applied to the original
will be applied to the origin the
navigates to.
Several features can be controlled at the same time by including a semi-colon-separated list of policy directives inside the
allow
attribute.
html
allow="geolocation 'self' https://a.example.com https://b.example.com; fullscreen 'none'">
It is worth giving the
src
value a special mention. We mentioned above that using this allowlist value will mean that the associated feature will be allowed in this
, as long as the document loaded into it comes from the same origin as the URL in its
src
attribute. This value is the
default
allowlist
value for features listed in
allow
, so the following are equivalent:
html
Denying access to powerful features
SecureCorp Inc. wants to disable Microphone (for example
MediaDevices.getUserMedia()
) and
Geolocation
APIs in its application. It can do so using the following response header:
http
Permissions-Policy: microphone=(), geolocation=()
By specifying
()
for the origin list, the specified features will be disabled for all browsing contexts (this includes all
s), regardless of their origin.
Combining HTTP header and
policies
For example, let's say that we wanted to enable geolocation usage on our own origin, and in embedded content coming from our trusted ad network. We could set up the page-wide Permissions Policy like this:
http
Permissions-Policy: geolocation=(self https://trusted-ad-network.com)
Over in our ad
s, we could set access to the
origin like this:
html
If a different origin ended up getting loaded into
, it would not have access to geolocation:
html
Reporting violations
This example shows how to configure reporting of
Permissions-Policy
violations to a server endpoint.
The response headers below block geolocation and define the reporting endpoint name for the feature as "geo_endpoint".
The
Reporting-Endpoints
HTTP response header is used to define the URL of this endpoint name.
http
Reporting-Endpoints: geo_endpoint="https://example.com/reports"
Permissions-Policy: geolocation=();report-to=geo_endpoint
Note:
To send all violation reports to the same endpoint we might instead define the
"default"
reporting endpoint
http
Reporting-Endpoints: default="https://example.com/reports"
Permissions-Policy: geolocation=()
A violation occurs when a page attempts to use the blocked feature, for example:
js
navigator.geolocation.getCurrentPosition(
() => {},
() => {},
);
The
report payload
sent to the endpoint might look like this:
json
"age": 48512,
"body": {
"columnNumber": 29,
"disposition": "enforce",
"lineNumber": 44,
"message": "Permissions policy violation: geolocation access has been blocked because of a permissions policy applied to the current document.",
"featureId": "geolocation",
"sourceFile": "https://example.com/"
},
"type": "permissions-policy-violation",
"url": "https://example.com/",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
Note:
Chrome's server-side serialization of violation reports uses
policyId
rather than
featureId
for the feature name in the
body
of a server report.
The
PermissionsPolicyViolationReport
returned by a
ReportingObserver
follows the specification.
Specifications
Specification
Permissions Policy
# permissions-policy-http-header-field
Browser compatibility
See also
Permissions Policy
Permissions-Policy-Report-Only
Document.featurePolicy
and
FeaturePolicy
Content-Security-Policy
Referrer-Policy
Reporting-Endpoints
PermissionsPolicyViolationReport
ReportingObserver
Reporting API
Help improve MDN
Learn how to contribute
This page was last modified on
Apr 21, 2026
by
MDN contributors
View this page on GitHub
Report a problem with this content