fix: sensible defaults — WAF http://127.0.0.1:8080, return 8080, timeout 500ms

This commit is contained in:
Claus Lohmar 2026-08-02 07:01:47 +00:00
parent 6c8815749f
commit 17ec29d41f
2 changed files with 7 additions and 6 deletions

View file

@ -12,7 +12,7 @@ import (
type Config struct {
Enabled bool `json:"enabled"`
WAFURL string `json:"waf_url"`
ReturnPort int `json:"return_port"` // port for WAF async callbacks
ReturnPort int `json:"return_port"`
HealthInterval int `json:"health_interval"`
TimeoutMs int `json:"timeout_ms"`
}
@ -33,9 +33,10 @@ var (
func defaultConfig() Config {
return Config{
Enabled: false,
WAFURL: "http://10.1.0.11:8081",
WAFURL: "http://127.0.0.1:8080",
ReturnPort: 8080,
HealthInterval: 5,
TimeoutMs: 3000,
TimeoutMs: 500,
}
}

View file

@ -27,13 +27,13 @@
<div class="field">
<label for="waf-url">WAF Inspection URL</label>
<input type="text" id="waf-url" placeholder="http://10.1.0.11:8081">
<input type="text" id="waf-url" placeholder="http://127.0.0.1:8080">
<small>The firewall service that inspects each request and returns a verdict.</small>
</div>
<div class="field">
<label for="return-port">Return Port (async callbacks)</label>
<input type="number" id="return-port" placeholder="9090" min="1" max="65535">
<input type="number" id="return-port" placeholder="8080" min="1" max="65535">
<small>WAF sends async verdicts/alerts to this port.</small>
</div>
@ -44,7 +44,7 @@
<div class="field">
<label for="timeout-ms">Proxy Timeout (ms)</label>
<input type="number" id="timeout-ms" placeholder="3000" min="100" max="30000">
<input type="number" id="timeout-ms" placeholder="500" min="100" max="10000">
</div>
<button id="save-btn" class="btn btn-primary">Save Configuration</button>