fix: restore return_port field — needed for WAF→Zoraxy return routing

This commit is contained in:
Claus Lohmar 2026-08-08 06:40:29 +00:00
parent f40971b5bb
commit f285295664
2 changed files with 5 additions and 0 deletions

View file

@ -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,
}

View file

@ -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)
}