fix(backend): 后台注册限流配置优先并保留注入兜底
This commit is contained in:
1 parent
903e7db085
commit
35d92c0148
4 files changed
+23
-8
No files matched your search
+4
-1
@@ -125,7 +125,10 @@ app.register.max-per-ip-per-day
|
||||
app.register.max-per-device-per-day
|
||||
```
|
||||
|
||||
键缺失或值不是整数时回退默认 5 / 3;值小于等于 0 表示对应维度不限制。
|
||||
运行时优先读取 `sys_config`。键缺失或值不是整数时,回退 `application.yml`
|
||||
中的 `fruitshorts.auth.register-max-per-ip-per-day` /
|
||||
`fruitshorts.auth.register-max-per-device-per-day`,缺省为 5 / 3;
|
||||
值小于等于 0 表示对应维度不限制。
|
||||
开发种子配置为 0 / 0,生产建议恢复为 5 / 3。
|
||||
|
||||
**残留风险**:IP 取自 `X-Forwarded-For`、设备号由客户端上报,都能伪造,只能挡脚本批量;
|
||||
|
||||
Reference in new issue
Block a user