Skip to content

Commit

Permalink
Fix notations of loopback addresses (#7474)
Browse files Browse the repository at this point in the history
  • Loading branch information
wataash authored and iansu committed Oct 23, 2019
1 parent 42140e5 commit 5ea3b34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/template/src/serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
Expand Down

0 comments on commit 5ea3b34

Please sign in to comment.