From f285295664fa3d2d8d84ee9c1cf9826bf0a1eb1d Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sat, 8 Aug 2026 06:40:29 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20restore=20return=5Fport=20field=20?= =?UTF-8?q?=E2=80=94=20needed=20for=20WAF=E2=86=92Zoraxy=20return=20routin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.go | 2 ++ main.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/config.go b/config.go index aa7869e..6dfb84b 100644 --- a/config.go +++ b/config.go @@ -11,6 +11,7 @@ import ( type Config struct { Enabled bool `json:"enabled"` WAFURL string `json:"waf_url"` + ReturnPort int `json:"return_port"` HealthInterval int `json:"health_interval"` TimeoutMs int `json:"timeout_ms"` } @@ -32,6 +33,7 @@ func defaultConfig() Config { return Config{ Enabled: false, WAFURL: "http://127.0.0.1:8080", + ReturnPort: 8081, HealthInterval: 5, TimeoutMs: 500, } diff --git a/main.go b/main.go index c04568e..90e653f 100644 --- a/main.go +++ b/main.go @@ -77,6 +77,9 @@ func handleSaveConfig(w http.ResponseWriter, r *http.Request) { if u := r.FormValue("waf_url"); u != "" { cfg.WAFURL = u } + if v := r.FormValue("return_port"); v != "" { + fmt.Sscanf(v, "%d", &cfg.ReturnPort) + } if v := r.FormValue("health_interval"); v != "" { fmt.Sscanf(v, "%d", &cfg.HealthInterval) }