Abner
|
5ed5bb678b
|
✨ docs: 更新项目文档与安全配置
- 更新 PROJECT_SUMMARY.md,新增 notification-manager.js 和 notification-service.js 模块说明,并将通用工具中的 i18n 移至括号内
- 完善 SECURITY.md,重构 CORS 配置为动态白名单校验并禁用 credentials,增强 CSP 策略并统一生产与本地环境的安全基准说明
- 重写 SERVICE_TIME_CHECK.md,采用模块化三层架构(utils/dom/app),使用 Intl API 处理英国时区与夏令时,支持双时间显示与国际化的同时强化 XSS 防护
- 修订 notification-system.md,明确通知 API 公开接口无需认证,细化安全实践并规范消息转义方式
- 调整 netlify/functions/CLAUDE.md,标注 notifications API 为公开接口(requireAuth: false)
|
2026-05-03 23:04:19 +08:00 |
|
Abner
|
14e2500a85
|
📝 docs: 更新项目文档和配置说明
- 更新 Jest 版本从 29.7.0 到 30.3.0,保持测试框架最新状态
- 修正文档链接,将性能说明指向 ARCHITECTURE.md 替代已废弃的 PERFORMANCE.md
- 新增 docs/CLAUDE.md 文档模块说明文件,明确文档结构和规范要求
- 删除过时的 REFACTORING_COMPLETE.md 文档,避免信息冗余
- 统一服务时间描述为英国时间 04:30–21:30,修正多处时间范围表述错误
|
2026-05-03 22:26:23 +08:00 |
|
Abner
|
7fd54dde39
|
♻️ refactor: 修复安全漏洞并优化架构债务
安全修复:
- 修复 dom.js 和 simyo/app.js 中的 innerHTML XSS 注入风险
- 使用 HTMLSanitizer.escapeHtml/escapeAttr 替代直接模板拼接
- 将 onclick 内联事件替换为 data-* 属性 + addEventListener
- 移除 server.js 中硬编码的 Simyo X-Client-Token
架构优化:
- 新增 _shared/rate-limiter.js 分布式限流模块 (Netlify Blobs)
- verify-cookie.js 内存限流替换为 KV 跨实例共享方案
- giffgaff/utils.js debounce/throttle 改为委托共享实现
- simyo/app.js 会话存储迁移至 SecureStorage (自动 TTL 过期)
- 合并 notifications-internal.js 至 notifications.js 消除双维护路径
|
2026-04-25 16:30:19 +08:00 |
|
Abner
|
277defb2bd
|
feat(notification): 调整通知去重策略为仅页面生命周期内去重
移除 localStorage 持久化去重机制,确保每次页面加载(包括刷新)都会显示一次最新通知。
更新相关文档,明确说明通知系统的行为变更及 API 使用方式。
完善测试覆盖,确保功能变更后回归测试全部通过。
|
2025-12-13 00:03:00 +08:00 |
|
Abner
|
abf9063b20
|
docs: 添加通知系统使用指南和完整实现文档
- 新增详细的通知系统使用指南,涵盖架构设计、快速开始、后端配置和故障排查
- 添加通知管理器组件,支持 success、warning、error、info 四种通知类型
- 实现通知服务,支持自动轮询和已读状态管理
- 创建 Netlify Functions 通知 API,提供通知消息查询接口
- 集成通知系统到主页面,在DOM加载完成后自动初始化
- 提供完整的样式系统,包含响应式设计和无障碍访问支持
|
2025-11-30 18:43:38 +08:00 |
|
Abner
|
fdd5602012
|
docs(README): 更新功能特性描述并精简文档链接
- 移除 README.md 中的冗余信息和不必要的文档链接
- 删除 DEPLOYMENT_GUIDE.md 的引用
- 精简 SERVICE_TIME_CHECK.md 和 ICON_FIX.md 的内容
- 移除 CORS_SOLUTION.md 中的其他解决方案部分
|
2025-08-09 23:19:01 +08:00 |
|
Abner
|
f03304095f
|
refactor(docs): remove outdated documentation files
|
2025-08-01 23:12:06 +08:00 |
|
Abner
|
c5fbc34d0a
|
🏗️ Major project restructure and CSP fix
🔧 Fixed CSP Issue:
- Root cause: Netlify CSP configuration overriding HTML meta CSP
- Added missing domains: id.giffgaff.com, publicapi.giffgaff.com
- Updated netlify.toml CSP configuration
- This resolves the OAuth token exchange CSP violation
📁 Project Architecture Restructure:
- src/: Source code organized by provider (giffgaff/, simyo/)
- docs/: Documentation categorized (fixes/, guides/, reference/)
- tests/: All test files centralized
- scripts/: Deployment and utility scripts
- postman/: API collections and reference files
🔄 Path Updates:
- Updated netlify.toml redirects for new file locations
- Updated README.md with new project structure
- Updated all internal documentation links
- Maintained backward compatibility for all URLs
📋 Files Moved:
- giffgaff_complete_esim.html → src/giffgaff/
- simyo_complete_esim.html → src/simyo/
- simyo_static.html → src/simyo/
- simyo_proxy_server.js → src/simyo/
- All docs → docs/{fixes,guides,reference}/
- All tests → tests/
- All scripts → scripts/
- Postman collections → postman/
✨ Benefits:
- Improved maintainability and organization
- Better separation of concerns
- Enhanced developer experience
- Cleaner project structure following best practices
- Zero impact on user experience (all URLs preserved)
This major restructure sets foundation for better scalability and maintenance.
|
2025-08-01 19:28:03 +08:00 |
|