MDN self-hosted library · e01.org

Permissions-Policy: local-network-access directive

The HTTP Permissions-Policy header local-network-access directive controls whether the current document is allowed to make network requests to local and loopback addresses. This policy directive is an alias for the newer local-network and loopback-network directives.

no runnable cells http-permissions-policy-directive upstream source

The HTTP Permissions-Policy header local-network-access directive controls whether the current document is allowed to make network requests to local and loopback addresses. This policy directive is an alias for the newer local-network and loopback-network directives.

  • A local address is only accessible on the local network; its target will differ on different networks. For example, 192.168.0.1.
  • A loopback address is only accessible on the local host; its target will differ on every device. For example, 127.0.0.1, which is generally known as localhost.

Specifically, where a defined policy blocks use of this feature, requests to local and loopback addresses will always fail. If you want more granular control over local and loopback addresses, you should use the newer directives linked above.

See Local Network Access > The local-network-access alias for more details.

Syntax

Permissions-Policy: local-network-access=<allowlist>;
  • <allowlist>
  • : A list of origins for which permission is granted to use the feature. See Permissions-Policy > Syntax for more details.

Default policy

The default allowlist for local-network-access is self.

Specifications

Browser compatibility

See also