From 695302c56307a409e49c1ff4baed84baddc2f241 Mon Sep 17 00:00:00 2001 From: Patrick Fischer Date: Thu, 26 Feb 2026 15:35:26 +0800 Subject: [PATCH] fix: bind HTTP server to localhost by default --- config.example.toml | 2 +- internal/config/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.example.toml b/config.example.toml index e6c19a0..b6d767c 100644 --- a/config.example.toml +++ b/config.example.toml @@ -6,7 +6,7 @@ index_path = "/home/brandon/.cache/danksearch/index" # HTTP server listen address -listen_addr = ":43654" +listen_addr = "127.0.0.1:43654" # Maximum file size to index (in bytes) max_file_bytes = 2097152 # 2MB diff --git a/internal/config/config.go b/internal/config/config.go index 14a3cb7..51a2500 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -124,7 +124,7 @@ func Default() *Config { cfg := &Config{ IndexPath: getDefaultIndexPath(), - ListenAddr: ":43654", + ListenAddr: "127.0.0.1:43654", MaxFileBytes: 2 * 1024 * 1024, WorkerCount: workerCount, IndexAllFiles: true,