feat(saas): add trusted_proxies config for reverse proxy rate limiting
- Add trusted_proxies field to ServerConfig (Vec<String>, serde default) - Default value is empty vector (no proxy trust until explicitly configured) - Development config: trust localhost IPs (127.0.0.1, ::1) - Production config: placeholder localhost IPs with comment to replace
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
host = "0.0.0.0"
|
||||
port = 8080
|
||||
cors_origins = [] # 空 = 开发模式允许所有来源
|
||||
trusted_proxies = ["127.0.0.1", "::1"]
|
||||
|
||||
[database]
|
||||
url = "postgres://postgres:123123@localhost:5432/zclaw"
|
||||
|
||||
Reference in New Issue
Block a user