From 0ae455333b3357f30f27da10557e4d9c006b5ba7 Mon Sep 17 00:00:00 2001 From: mattyw Date: Thu, 12 Feb 2015 16:00:32 +0800 Subject: [PATCH] api/server: don't print warning if serving on localhost Fixes bug #10728 Signed-off-by: mattyw --- api/server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/server/server.go b/api/server/server.go index 548dd34f8f..78ca4b7829 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -1554,8 +1554,8 @@ func allocateDaemonPort(addr string) error { } func setupTcpHttp(addr string, job *engine.Job) (*HttpServer, error) { - if !strings.HasPrefix(addr, "127.0.0.1") && !job.GetenvBool("TlsVerify") { - log.Infof("/!\\ DON'T BIND ON ANOTHER IP ADDRESS THAN 127.0.0.1 IF YOU DON'T KNOW WHAT YOU'RE DOING /!\\") + if !job.GetenvBool("TlsVerify") { + log.Infof("/!\\ DON'T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING /!\\") } r := createRouter(job.Eng, job.GetenvBool("Logging"), job.GetenvBool("EnableCors"), job.Getenv("Version"))