Skip to content

Chrome: Add enterprise policy for LocalNetworkAccessAllowedForUrls #1368

@tresf

Description

@tresf
Image Image

Since Chrome 139 to suppress a pop-up to Chrom(ium) users:
https://chromeenterprise.google/policies/#LocalNetworkAccessAllowedForUrls

This makes most sense for localhost, since any other DNS names would imply that the browser's running elsewhere.

See also: WICG/local-network-access#16

To test:

  1. Visit chrome://settings/performance
  2. Select "Enable (Blocking)"
    Image
  3. Restart the browser
  4. Visit https://demo.qz.io
  5. Paste the following code into terminal:
    fetch('http://localhost:8182/json')
     .then(response => response.json())
     .then(data => console.log(data))
     .catch(error => console.error('Error:', error));

Policy Examples

Windows Registry

Software\Policies\Google\Chrome\LocalNetworkAccessAllowedForUrls\1 = http://www.example.com:8080
Software\Policies\Google\Chrome\LocalNetworkAccessAllowedForUrls\2 = [*.]example.edu
Software\Policies\Google\Chrome\LocalNetworkAccessAllowedForUrls\3 = *

macOS Plist

<array>
<string>http://www.example.com:8080</string>
<string>[*.]example.edu</string>
<string>*</string>
</array>

Linux JSON

[
 "http://www.example.com:8080",
 "[*.]example.edu",
 "*"
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    timebombSomething's going to break on a specific day

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions