From f34172761f4d7ba4fc181d7a5ae07d9392eaa5cd Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Fri, 28 Dec 2018 14:51:20 +0100 Subject: [PATCH] Log valid URL when binding to all IPs --- cmd/echoip/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/echoip/main.go b/cmd/echoip/main.go index fb42b68..0c56325 100644 --- a/cmd/echoip/main.go +++ b/cmd/echoip/main.go @@ -48,7 +48,11 @@ func main() { log.Printf("Trusting header(s) %+v to contain correct remote IP", opts.IPHeaders) } - log.Printf("Listening on http://%s", opts.Listen) + listen := opts.Listen + if listen == ":8080" { + listen = "0.0.0.0:8080" + } + log.Printf("Listening on http://%s", listen) if err := server.ListenAndServe(opts.Listen); err != nil { log.Fatal(err) }