feat: phase1 UI prep — P1 安全(XFF防护), P2 规模化(平台索引+region保护), P3 文档补全

P1 安全: WebUtils.getClientIp 改为 remoteAddr 优先 + 可信代理 CIDR 配置
P2 规模化: DISTINCT ON 查询补匹配排序的部分索引 (migrate-k113)
P2 一致性: syncCountryByIp regionCode 同语言/时区/币种加保护,不覆盖用户自定义
P3 文档: api-phase1.md 新增 platform 参数说明, IpRegionService 新增集成测试 + VERSION
新增: CountryProfile 52 国映射 + IpRegionService 离线 ip2region 解析
平台筛选: app-users/favorites/likes/watch-history 按最近一次会话 ANDROID/IOS 筛选
This commit is contained in:
Vicky authored and trae-solo-agent committed 2026-10-27 15:45:15 +08:00
1 parent a41ab18636
commit 272aa62434
34 files changed
+748 -77

No files matched your search

@@ -0,0 +1,12 @@
# Author: fruit.com.cn
# ip2region 离线库数据版本追踪
# 每次替换 ip2region.xdb 时更新此文件
version: 2.7.0
updated: 2026-10-21
source: org.lionsoul:ip2region:2.7.0
xdb-path: fruitshorts-module-user/src/main/resources/ip2region/ip2region.xdb
# 覆盖范围:国家 + 省份 + 城市 + 运营商(IPv4)
# 生产请留意:xdb 随 jar 打包约 11MB,admin-api 不解析 IP 但也会带上这份数据。
# 后续可考虑用 Spring Profile + 条件装配,让 admin-api 不带 ip2region。