Skip to content

Requests resolving differently within a network getting blocked #81

@RivenSkaye

Description

@RivenSkaye

At $employer we host one subdomain from an on-site server, that within the local network gets resolved to its local address (e.g. 192.168.60.42). Our normal website will sometimes load images from this subdomain, which gets blocked by Chrome when viewing the page from within the network. For all intents and purposes, this is a normal domain getting resolved (subdomain.example.com). Because it resolves to a local address, Chrome immediately blocks the request and prompts the user. For non-technical employees this raises questions (and sometimes seems alarming).

Once the popup appears, the <img> element's onerror handler will always be run, even when permission is granted. This raises even more questions as the image elements go from an empty square into an error/broken image state and it is entirely invisible to the user what the LAN access request is for then.

Perhaps it'd make sense to exclude (other) subdomains of the current domain from getting flagged for this¹, or to not block in situations where CORS would allow the GET request and the MIME type is e.g. image/* or similar. To prevent letting the initial request go through with whatever side effects this has, possibly consider making a HEAD² request to the resource to check this.

¹: considering example.com as before, allow any directionality between *.example.com, example.com, very.deeply.nested.subdomain.example.com, so long as the domain portion itself is the same.
²: Output of a HEAD request for one of the affected files:

HTTP/2 200
content-length: 71542
content-type: image/jpeg
last-modified: Mon, 21 Nov 2022 20:00:00 GMT
accept-ranges: bytes
etag: "0602bd6e3fdd81:0"
server: REDACTED
date: Fri, 05 Dec 2025 10:37:08 GMT

Assuming the local resource is not compromised (LAN Access is aimed at protecting local resources after all), it should be fair to assume it reports honest data. Resources not supporting HEAD requests might need different handling (fall back to matching the request URI? Or display the popup as the resource cannot be verified?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions