Skip to content

Commit

Permalink
fix accept incoming network connections (gin-gonic#2216)
Browse files Browse the repository at this point in the history
  • Loading branch information
kebo authored and pull[bot] committed Mar 7, 2020
1 parent 3e7b99d commit 350b133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.go
Expand Up @@ -139,10 +139,10 @@ func resolveAddress(addr []string) string {
case 0:
if port := os.Getenv("PORT"); port != "" {
debugPrint("Environment variable PORT=\"%s\"", port)
return ":" + port
return "localhost:" + port
}
debugPrint("Environment variable PORT is undefined. Using port :8080 by default")
return ":8080"
return "localhost:8080"
case 1:
return addr[0]
default:
Expand Down

0 comments on commit 350b133

Please sign in to comment.