Skip to content

Commit 350b133

Browse files
kebopull[bot]
kebo
authored andcommitted
fix accept incoming network connections (gin-gonic#2216)
1 parent 3e7b99d commit 350b133

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ func resolveAddress(addr []string) string {
139139
case 0:
140140
if port := os.Getenv("PORT"); port != "" {
141141
debugPrint("Environment variable PORT=\"%s\"", port)
142-
return ":" + port
142+
return "localhost:" + port
143143
}
144144
debugPrint("Environment variable PORT is undefined. Using port :8080 by default")
145-
return ":8080"
145+
return "localhost:8080"
146146
case 1:
147147
return addr[0]
148148
default:

0 commit comments

Comments
 (0)