fix: sensible defaults — WAF http://127.0.0.1:8080, return 8080, timeout 500ms
This commit is contained in:
parent
6c8815749f
commit
17ec29d41f
2 changed files with 7 additions and 6 deletions
|
|
@ -12,7 +12,7 @@ import (
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
WAFURL string `json:"waf_url"`
|
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"`
|
HealthInterval int `json:"health_interval"`
|
||||||
TimeoutMs int `json:"timeout_ms"`
|
TimeoutMs int `json:"timeout_ms"`
|
||||||
}
|
}
|
||||||
|
|
@ -33,9 +33,10 @@ var (
|
||||||
func defaultConfig() Config {
|
func defaultConfig() Config {
|
||||||
return Config{
|
return Config{
|
||||||
Enabled: false,
|
Enabled: false,
|
||||||
WAFURL: "http://10.1.0.11:8081",
|
WAFURL: "http://127.0.0.1:8080",
|
||||||
|
ReturnPort: 8080,
|
||||||
HealthInterval: 5,
|
HealthInterval: 5,
|
||||||
TimeoutMs: 3000,
|
TimeoutMs: 500,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="waf-url">WAF Inspection URL</label>
|
<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>
|
<small>The firewall service that inspects each request and returns a verdict.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="return-port">Return Port (async callbacks)</label>
|
<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>
|
<small>WAF sends async verdicts/alerts to this port.</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="timeout-ms">Proxy Timeout (ms)</label>
|
<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>
|
</div>
|
||||||
|
|
||||||
<button id="save-btn" class="btn btn-primary">Save Configuration</button>
|
<button id="save-btn" class="btn btn-primary">Save Configuration</button>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue