Log valid URL when binding to all IPs

This commit is contained in:
Martin Polden 2018-12-28 14:51:20 +01:00
parent 4bfaf671b9
commit f34172761f
1 changed files with 5 additions and 1 deletions

View File

@ -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)
}