Skip to content

Commit a7d06d5

Browse files
committed
adjust rule
1 parent 002ff10 commit a7d06d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: packages/react-dev-utils/WebpackDevServerUtils.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ function prepareUrls(protocol, host, port) {
5656
lanUrlForConfig = address.ip();
5757
if (lanUrlForConfig) {
5858
// Check if the address is a private ip
59-
if (/^(10|172|192)[.]/.test(lanUrlForConfig)) {
59+
if (
60+
/^10[.]|^172[.](1[6-9]|2[0-9]|3[0-1])[.]|^192[.]168[.]/.test(
61+
lanUrlForConfig
62+
)
63+
) {
6064
// Address is private, format it for later use
6165
lanUrlForTerminal = prettyPrintUrl(lanUrlForConfig);
6266
} else {

0 commit comments

Comments
 (0)