Skip to content

Commit 5ea3b34

Browse files
wataashiansu
authored andcommitted
Fix notations of loopback addresses (#7474)
1 parent 42140e5 commit 5ea3b34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-scripts/template-typescript/src/serviceWorker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const isLocalhost = Boolean(
1414
window.location.hostname === 'localhost' ||
1515
// [::1] is the IPv6 localhost address.
1616
window.location.hostname === '[::1]' ||
17-
// 127.0.0.1/8 is considered localhost for IPv4.
17+
// 127.0.0.0/8 are considered localhost for IPv4.
1818
window.location.hostname.match(
1919
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
2020
)

packages/react-scripts/template/src/serviceWorker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const isLocalhost = Boolean(
1414
window.location.hostname === 'localhost' ||
1515
// [::1] is the IPv6 localhost address.
1616
window.location.hostname === '[::1]' ||
17-
// 127.0.0.1/8 is considered localhost for IPv4.
17+
// 127.0.0.0/8 are considered localhost for IPv4.
1818
window.location.hostname.match(
1919
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
2020
)

0 commit comments

Comments
 (0)