From 217e5e90ff80d2fb5e89059271d6d1bb3314a551 Mon Sep 17 00:00:00 2001 From: Toby Chui Date: Sun, 15 Jun 2025 13:56:10 +0800 Subject: [PATCH] Fixed #672 Fixing a minor log print logic --- src/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.go b/src/main.go index 18dd086..f577d50 100644 --- a/src/main.go +++ b/src/main.go @@ -37,6 +37,7 @@ import ( "net/http" "os" "os/signal" + "strings" "syscall" "time" @@ -125,7 +126,13 @@ func main() { //Start the finalize sequences finalSequence() - SystemWideLogger.Println(SYSTEM_NAME + " started. Visit control panel at http://localhost" + *webUIPort) + if strings.HasPrefix(*webUIPort, ":") { + //Bind to all interfaces, issue #672 + SystemWideLogger.Println(SYSTEM_NAME + " started. Visit control panel at http://localhost" + *webUIPort) + } else { + SystemWideLogger.Println(SYSTEM_NAME + " started. Visit control panel at http://" + *webUIPort) + } + err = http.ListenAndServe(*webUIPort, csrfMiddleware(webminPanelMux)) if err != nil {