Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

Permissions Policy Header, iframe allow, Cross-Origin Features, and Local Network Access

How the Permissions-Policy header and iframe allow attribute control browser APIs, cross-origin embeds, and Local Network Access in Chromium.

This page summarises how Permissions Policy is documented in Chrome’s Permissions Policy guide, the HTML policy-controlled features definitions, and related Chromium guidance on Local Network Access. Permissions Policy (formerly Feature Policy) lets a site declare which powerful browser features may run on the top-level page, in cross-origin iframes, and in embedded third-party code—separate from the user prompts that still apply for many APIs.

Permissions Policy vs Feature Policy: what changed

Section titled “Permissions Policy vs Feature Policy: what changed”

Permissions Policy is the current name for the mechanism that used to be called Feature Policy. Chrome documents that the key ideas are unchanged, but the HTTP header syntax moved to Structured Fields style:

Permissions Policy was previously known as Feature Policy. The key concepts remain the same, but there are some important changes along with the name.

— Chrome, Control browser features with Permissions Policy

Old Feature Policy example:

geolocation 'self' https://example.com; camera 'none'

Equivalent Permissions Policy:

geolocation=(self "https://example.com"), camera=()

Feature-Policy can still be sent in Chromium after Chrome 88, but it acts as an alias; if both are present, Permissions-Policy wins.

Section titled “What is a Permissions Policy: headers, iframes, and user consent”

Chrome describes Permissions Policy as control over “browser features available to a page, its iframes, and subresources” via policies tied to an origin list in a response header:

Permissions Policy, formerly known as Feature Policy, allows the developer to control the browser features available to a page, its iframes, and subresources, by declaring a set of policies for the browser to enforce.

— Chrome, Control browser features with Permissions Policy

A policy can be set with the Permissions-Policy response header and/or the iframe allow attribute. For WebUSB, Chrome gives a header example that blocks USB while allowing other features:

A Permissions Policy is a mechanism that allows developers to selectively enable and disable various browser features and APIs. It can be defined via an HTTP header and/or an iframe allow attribute.

— Chrome, Access USB Devices on the Web

The user still has the final say for many powerful features: developers narrow what code may ask; the user accepts or denies prompts.

Permissions-Policy header: origin lists and tokens

Section titled “Permissions-Policy header: origin lists and tokens”

The header shape documented by Chrome is:

Permissions-Policy: <feature>=(<token>|<origin(s)>)
Syntax Meaning Example
[FEATURE]=* All origins on the page geolocation=*
[FEATURE]=(self) Same origin only geolocation=(self)
[FEATURE]=(self "https://a.example") Same origin plus listed origins geolocation=(self "https://trusted-site.example")
[FEATURE]=() Blocked for everyone geolocation=()

Multiple features are comma-separated; multiple origins in one feature are space-separated inside the parentheses.

Cross-origin iframes need both header and allow

Section titled “Cross-origin iframes need both header and allow”

With Permissions Policy (unlike early Feature Policy), listing a cross-origin origin in the header is not enough:

With the change in Permissions Policy from Feature Policy, adding the origin to the header origin list is no longer enough to enable the feature for a cross-origin iframe. The iframe must include the allow attribute if it’s cross-origin, regardless of what is set in the header origin list.

— Chrome, Control browser features with Permissions Policy

Typical pattern for a trusted embed:

Permissions-Policy: geolocation=(self "https://trusted-site.example")
<iframe src="https://trusted-site.example" allow="geolocation"></iframe>

allow="geolocation" is shorthand for allow="geolocation 'src'", where src expands to the iframe document’s origin.

Different paths on the same origin are still same-origin and do not need separate listing. Different subdomains are same-site but cross-origin: each subdomain that should use a feature must appear in the origin list (for example browsing-topics=(self) does not cover https://subdomain.your-site.example).

If the top-level page has a feature blocked with feature=(), embedded cross-origins cannot use it either—permissions delegate from parent to child.

If an iframe may navigate to another origin, you can extend allow so policy follows navigation, for example:

<iframe src="https://trusted-site.example" allow="geolocation https://trusted-site.example https://trusted-navigated-site.example"></iframe>

Chrome documents this in Handle iframe navigation.

Policy-controlled features: HTML defaults and examples

Section titled “Policy-controlled features: HTML defaults and examples”

The HTML Living Standard (and the web developer edition) tie many platform APIs to policy-controlled features. Examples called out there include features whose default allowlist is 'self'—only the embedding origin unless you widen the policy—including:

  • autoplay
  • cross-origin-isolated
  • focus-without-user-activation

Chrome’s Web Security guidance recommends disabling unused sensors and blocking focus-without-user-activation for third-party iframes to reduce focus stealing, while still using allow on iframes that legitimately need delegation—for example payment or fullscreen on a video player.

Many capability docs repeat the same iframe pattern: built-in AI APIs (language-model, summarizer, translator, etc.), Generic Sensor (accelerometer), and FedCM in cross-origin iframes (identity-credentials-get) all require the embedder to set allow="…" and optionally tighten the header, e.g.:

Permissions-Policy: identity-credentials-get=(self "https://fedcm-cross-origin-iframe.glitch.me")

User-Agent Client Hints use per-hint policy names (lowercase, without the Sec- prefix), for example ch-dpr=(self "cdn.provider") alongside Accept-CH.

Local Network Access: local-network and loopback-network

Section titled “Local Network Access: local-network and loopback-network”

From Chrome 142 onward, Local Network Access (LNA) restricts requests from public sites to local or loopback address space. Chromium applies this at the engine level, so it affects Edge, Brave, Opera, and other Chromium browsers—not only Chrome. Cloudflare’s tunnel documentation describes a corporate edge case: if DNS resolves to CGNAT space (such as 100.64.0.0/10), browsers may treat subrequests as public-to-local and block them until the user approves local network access.

Chrome’s Local Network Access guide splits permissions into:

  • local-network — public → LAN / RFC 1918 / .local, etc.
  • loopback-network — public or local → 127.0.0.1, localhost, ::1

Both are policy-controlled with default allowlist 'self', so cross-origin iframes need explicit delegation:

<iframe
src="https://setup.partner.example.com/device-bridge"
allow="local-network; loopback-network"
title="Local Device Bridge">
</iframe>
Permissions-Policy: local-network=(self "https://setup.partner.example.com"), loopback-network=(self "https://setup.partner.example.com")

Set the header on the embedding document, not only on the iframe response.

LNA also requires secure contexts (https://); permission is denied in insecure top-level http:// pages. For fetch() to local http:// devices, Chrome requires targetAddressSpace: 'local' or 'loopback' on the Request. Do not rely on deprecated Private Network Access preflight headers as a substitute—LNA uses permission prompts plus normal CORS.

Enterprise mitigations for misclassified CGNAT resolver ranges (Chrome enterprise policies, feature flags) are listed in the same Cloudflare pages under workarounds; the durable fix called out there is moving initial resolved IP ranges out of CGNAT to public space such as 172.64.128.0/20 where applicable.

Permissions set in headers are partially introspectable via the legacy document.featurePolicy / element.featurePolicy API (still named Feature Policy in code). For cross-origin iframes, Chrome recommends iframeEl.featurePolicy.allowsFeature('camera') so the allow attribute is included—document.featurePolicy.allowsFeature(feature, origin) alone does not prove the iframe may use the feature.

In DevTools, the Application panel lists allowed and blocked features per frame (Chrome DevTools integration).

  • Sending only the header for a cross-origin iframe and omitting allow—the feature stays blocked.
  • Putting allow="geolocation" on an ad iframe while the header lists only self and a trusted partner—the ad origin is not in the origin list, so access remains blocked (by design).
  • Blocking camera=(), microphone=(), etc. globally without auditing embeds—widgets can fail silently (Web Security).
  • Assuming one subdomain entry covers another subdomain of the same registrable domain.
  • For LNA: firing local requests on page load without navigator.permissions.query({ name: 'local-network' }) and a user gesture when state is prompt; querying deprecated local-network-access in older Chrome (can crash—see Local Network Access).
  • For WebOTP in cross-origin iframes: missing otp-credentials policy, or embedding chains with more than one unique cross-origin ancestor where Chrome does not support the API.
  1. Open your page in Chrome, DevTools → Application, select each frame, and review allowed vs blocked policy-controlled features (Permissions Policy in DevTools).

  2. In the Network panel, inspect response headers for Permissions-Policy (and any legacy Feature-Policy) on the HTML document and on iframe subdocuments.

  3. For a cross-origin embed you expect to work, confirm the origin appears in the header origin list and the iframe tag includes the matching allow token (for example usb, identity-credentials-get, local-network).

  4. If the site talks to LAN or loopback targets, load it over https://, trigger access from a user gesture, and confirm local-network / loopback-network permission state in site settings; for fetches, verify targetAddressSpace matches the resolved address class per Local Network Access.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about, and we will correct or clarify it.