File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2929 exit 1
3030fi
3131
32+
3233# replace all occurrences of 127.0.0.1 with 0.0.0.0
3334# TL;DR: macOS Docker's extra VM layer requires explicit binding to all interfaces (0.0.0.0) to be reachable from the host.
34- if grep -q " 127.0.0.1" " $1 " ; then
35- sed -i ' s/ 127.0.0.1/ 0.0.0.0/ g' " $1 "
36- echo " Success: replaced '127.0.0.1' with '0.0.0.0'."
35+ if grep -q ' var ADDRESS = "http:// 127.0.0.1"' " $1 " ; then
36+ sed -i ' s|var ADDRESS = "http:// 127.0.0.1"|var ADDRESS = "http:// 0.0.0.0"| g' " $1 "
37+ echo " Success: replaced 'var ADDRESS = \" http:// 127.0.0.1\" ' with 'var ADDRESS = \" http:// 0.0.0.0\" '."
3738else
38- echo " Error: no line matching '127.0.0.1' found in '$1 '."
39+ echo " Error: no line matching 'var ADDRESS = \" http:// 127.0.0.1\" ' found in '$1 '."
3940 exit 1
4041fi
You can’t perform that action at this time.
0 commit comments