feat: 新增全局CORS跨域过滤器,支持设备后台跨域访问网关

- 新增 CorsFilter(@Component(index=-200)最高优先级)
- OPTIONS预检请求:动态回显 Access-Control-Request-Headers,直接短路返回200不透传源服务器
- 其他请求:响应头补充 Access-Control-Allow-Origin 等CORS头
- 解决jeecg vue3前端自定义头(x-version等)被CORS拦截问题

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-05 18:23:13 +08:00
co-authored by Claude
parent 020f112124
commit a7937b76d6
2 changed files with 53 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@
- `/sys/watchUserLogin`**本地处理**:解密验证设备密码(防伪造)+ 单飞换 token + Redis 缓存
- 其余业务接口 → **手动 HttpUtils 透传**至源服务器 `http://10.10.10.228:29999`
- token 失效三重自愈:10秒主动探活 + 预过期刷新 + 业务接口 401 被动兜底
- **全局 CORS**CorsFilter 处理跨域(设备后台跨域访问网关),OPTIONS 预检直接短路返回
## 技术栈