Files
cloudflare_temp_email/frontend
Dream Hunter eaeac8ebec feat: 添加浏览器指纹黑名单功能 (#757)
* feat: 添加浏览器指纹黑名单功能

- 前端集成 @fingerprintjs/fingerprintjs 库自动采集浏览器指纹
- 在所有 API 请求中通过 x-fingerprint header 传递指纹信息
- 将指纹黑名单集成到现有的 IP 黑名单功能中
- 支持精确匹配和正则表达式模式匹配指纹
- 在 App.vue mount 时预初始化指纹,避免首次请求延迟
- 使用 Vue 全局状态缓存指纹,避免重复生成
- 管理后台新增指纹黑名单配置,与 IP/ASN 黑名单统一管理
- 后端在限流 API 请求前检查指纹黑名单,返回 403 阻止访问

技术细节:
- 指纹生成时间:50-300ms(一次性)
- 缓存命中:<1ms
- 请求开销:~20 字节/请求
- 支持最多 1000 条指纹黑名单规则
- 完善的错误处理,失败时不阻塞正常请求

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: 优化浏览器指纹初始化逻辑

- 移除 App.vue 中的预初始化,改为在首次 API 调用时自动初始化
- 移除不必要的 clearFingerprintCache 函数
- 初始化失败时返回特殊值 'ERROR' 而非空字符串
- 失败值会被缓存,避免重复尝试失败

优势:
- 减少页面加载时的初始化开销
- 简化代码,去除不必要的函数
- 更清晰的错误标识

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 15:50:39 +08:00
..

cloudflare_temp_email

This template should help get you started developing with Vue 3 in Vite.

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build