fix(backend): 改为后台配置注册限流阈值

This commit is contained in:
Zhou Weidong committed 2026-10-17 23:29:25 +08:00
1 parent 78fb99530d
commit f1aaaee814
8 files changed
+79 -39

No files matched your search

+3 -3
View File
@@ -118,15 +118,15 @@ POST /app/auth/register
频控口径落库在 `app_user.register_ip` / `app_user.register_device_id` 上(按 24h 计数,不新建计数表)。
注册频控阈值通过以下配置键调整:
注册频控阈值存储在 `sys_config`,可在后台「系统设置」修改:
```text
fruitshorts.auth.register-max-per-ip-per-day
fruitshorts.auth.register-max-per-device-per-day
```
未配置时默认 5 / 3;值小于等于 0 表示对应维度不限制。开发
`application.yml` 显式设为 0 / 0,`application-prod.yml` 固定为 5 / 3。
键缺失或值不是整数时回退默认 5 / 3;值小于等于 0 表示对应维度不限制。
开发种子配置为 0 / 0,生产建议恢复为 5 / 3。
**残留风险**:IP 取自 `X-Forwarded-For`、设备号由客户端上报,都能伪造,只能挡脚本批量;
真要防住需要接图形/行为验证码或风控服务,本阶段未做。验证码通道目前是 `LogOtpSender`(只写日志不发信),