Update isLocalURL to include LAN addresses, .local domains, and hostn…#5973
Open
cathaysia wants to merge 4 commits intofirefox-devtools:mainfrom
Open
Update isLocalURL to include LAN addresses, .local domains, and hostn…#5973cathaysia wants to merge 4 commits intofirefox-devtools:mainfrom
cathaysia wants to merge 4 commits intofirefox-devtools:mainfrom
Conversation
38f05a1 to
c5cad4d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5973 +/- ##
==========================================
+ Coverage 85.34% 85.35% +0.01%
==========================================
Files 318 318
Lines 31922 31947 +25
Branches 8834 8851 +17
==========================================
+ Hits 27244 27269 +25
Misses 4246 4246
Partials 432 432 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
canova
reviewed
Apr 30, 2026
Member
canova
left a comment
There was a problem hiding this comment.
Thanks for the PR, adding some comments below.
| return true; | ||
| } | ||
| // .local domains or hostnames without dots | ||
| if (hostname.endsWith('.local') || !hostname.includes('.')) { |
Member
There was a problem hiding this comment.
Hmm !hostname.includes('.') will now catch all ipv6 addresses. I think we can remove this check.
Author
There was a problem hiding this comment.
I add a new function isLocalHostName, which will check is the hostname is a local hostname. :)
7dcfd1c to
ee13e17
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Treat non-public addresses—such as loopback addresses, LAN addresses, and CGNAT addresses—as local addresses; this allows for direct access to computers within the local network, Tailscale and etc..