Skip to content

Commit 47a7b3d

Browse files
committed
pkg/cmd: add more common hosts to localhost regexp
1 parent ba529e1 commit 47a7b3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import (
4646
const dockerInternalHost = "host.docker.internal"
4747

4848
var (
49-
localRegex = regexp.MustCompile(`(?i)\b(localhost|localhost4|127.0.0.1|localhost6|ip6-localhost|::1|\[::1\])\b`)
49+
localRegex = regexp.MustCompile(`(?i)(\b(localhost|localhost4|127\.0\.0\.1|localhost6|ip6-localhost)\b|::1|\[::1\])`)
5050
dockerClientHost = ""
5151
execCommand = exec.Command
5252
)

0 commit comments

Comments
 (0)