From 380e78856d59eca5bc409b9120c4663f2740c28a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 11:38:16 +0000 Subject: [PATCH 1/2] Initial plan From b4cdb46df79c4505b2cf8efe5ae731d82a226447 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 11:42:26 +0000 Subject: [PATCH 2/2] Implement STATIC_PATH fallback logic with info logging Co-authored-by: JonasGao <4549584+JonasGao@users.noreply.github.com> --- config/config.go | 5 +++++ main.go | 2 ++ 2 files changed, 7 insertions(+) diff --git a/config/config.go b/config/config.go index abf1670..d94ea49 100644 --- a/config/config.go +++ b/config/config.go @@ -138,6 +138,11 @@ func LoadConfig() (*Config, error) { cfg.configPath = configPath + // If static path is blank in config, try to read from environment variable + if cfg.StaticPath == "" { + cfg.StaticPath = os.Getenv("STATIC_PATH") + } + // Hash password for validation if cfg.Password != "" { // Check if password is already hashed diff --git a/main.go b/main.go index a57903e..ed3fdb0 100644 --- a/main.go +++ b/main.go @@ -125,6 +125,8 @@ func main() { fs := http.FileServer(http.Dir(cfg.StaticPath)) router.PathPrefix("/").Handler(fs) } + } else { + log.Println("Info: Static path not configured, static file serving disabled") } // Create HTTP server