mavweb: default -addr to loopback, not all interfaces

PR #47 added two state-changing routes (POST /chat, POST /routines)
behind the -addr flag, which defaulted to ":9200" (all interfaces).
Default now binds 127.0.0.1:9200; anyone who wants LAN/wider exposure
still passes an explicit bind (as deploy/docker-compose.yml already
does with "-addr :9201" inside the container, unaffected by this
default change).

Vikunja #317.
This commit is contained in:
kami
2026-07-31 23:03:45 +04:00
parent 73d13f1ea6
commit d12de589a2
+1 -1
View File
@@ -314,7 +314,7 @@ func noCache(h http.Handler) http.Handler {
} }
func main() { func main() {
addr := flag.String("addr", ":9200", "HTTP listen address") addr := flag.String("addr", "127.0.0.1:9200", "HTTP listen address (loopback by default; pass e.g. \":9200\" or a LAN IP deliberately for wider exposure — POST /chat and /routines are state-changing)")
voiceAddr := flag.String("voice", "127.0.0.1:9100", "voice server TCP addr (host:port)") voiceAddr := flag.String("voice", "127.0.0.1:9100", "voice server TCP addr (host:port)")
// ntfyWS: the ntfy WebSocket subscribe URL the PWA connects to for in-app // ntfyWS: the ntfy WebSocket subscribe URL the PWA connects to for in-app
// nudge delivery, e.g. wss://ntfy.kvmx.ru/maven/ws?auth=<base64-token>. The // nudge delivery, e.g. wss://ntfy.kvmx.ru/maven/ws?auth=<base64-token>. The