server: trusted_proxies – X-Forwarded-For für Rate-Limit hinter Reverse-Proxy
This commit is contained in:
parent
97646da970
commit
126f4be2b9
6 changed files with 101 additions and 7 deletions
|
|
@ -75,7 +75,7 @@ type Tools struct {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
Listen string `yaml:"listen" json:"listen"`
|
||||
Listen string `yaml:"listen" json:"listen"`
|
||||
// AuthToken is an optional static admin token (sees all sessions). Users log in via /api/auth.
|
||||
AuthToken string `yaml:"auth_token" json:"auth_token"`
|
||||
// AllowRegistration enables self-service sign-up (default true).
|
||||
|
|
@ -84,6 +84,8 @@ type Config struct {
|
|||
TokenTTLHours int `yaml:"token_ttl_hours" json:"token_ttl_hours"`
|
||||
// AllowedOrigins for browser WebSocket/CORS. Empty = same host only. "*" must be set explicitly.
|
||||
AllowedOrigins []string `yaml:"allowed_origins" json:"allowed_origins"`
|
||||
// TrustedProxies (IPs/CIDRs) whose X-Forwarded-For is used for rate limiting. Empty = loopback only.
|
||||
TrustedProxies []string `yaml:"trusted_proxies" json:"trusted_proxies"`
|
||||
DataDir string `yaml:"data_dir" json:"data_dir"`
|
||||
Workspace string `yaml:"workspace" json:"workspace"`
|
||||
LLM LLM `yaml:"llm" json:"llm"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue