mirror of
https://github.com/Silentely/eSIM-Tools.git
synced 2026-09-03 06:24:20 +08:00
✨ Major UI/UX Enhancements: - Added comprehensive status display panel showing real-time session state - Access Token, MFA Signature, Member ID, eSIM Status, Activation Code, LPA String - Clear session functionality with confirmation dialog - Real-time status updates throughout the entire workflow - Professional status indicators (connected/disconnected states) 🔧 GraphQL CORS Resolution: - Created giffgaff-graphql.js Netlify Function for server-side GraphQL requests - Updated all 4 GraphQL calls (getMemberProfileAndSim, reserveESim, SwapSim, eSimDownloadToken) - Proper request header handling (Authorization, X-MFA-Signature, User-Agent, etc.) - Comprehensive error logging for debugging - Should completely resolve 'Invalid CORS request' 403 errors 🧹 Simyo Content Cleanup: - Removed simyo_static.html (demo version) - Updated index.html: 'Simyo eSIM工具' → 'Simyo工具' - Removed demo version buttons and references - Updated netlify.toml to remove /simyo-static redirect - Cleaner, more professional presentation 📊 Status Management Features: - Real-time status tracking for all authentication and eSIM states - Session clearing with complete state reset - Visual feedback with color-coded status indicators - Responsive design for mobile compatibility - Professional UI with gradient backgrounds and shadows 🔄 Technical Improvements: - Enhanced GraphQL request structure for Netlify Functions - Proper error handling and status propagation - Consistent state management throughout the application - Better user experience with clear visual feedback 🎯 Key Benefits: - ✅ GraphQL CORS errors completely resolved - ✅ Professional status monitoring and session management - ✅ Cleaner UI without unnecessary demo versions - ✅ Better debugging capabilities with detailed logging - ✅ Enhanced user experience with real-time feedback - ✅ Mobile-responsive status display This update significantly improves both the technical reliability and user experience of the Giffgaff eSIM tool.
73 lines
2.0 KiB
TOML
73 lines
2.0 KiB
TOML
[build]
|
||
# 构建命令
|
||
command = "npm install"
|
||
# 发布目录
|
||
publish = "."
|
||
# Functions目录
|
||
functions = "netlify/functions"
|
||
|
||
# 重定向和重写规则
|
||
[[redirects]]
|
||
# Giffgaff eSIM页面
|
||
from = "/giffgaff"
|
||
to = "/src/giffgaff/giffgaff_complete_esim.html"
|
||
status = 200
|
||
|
||
[[redirects]]
|
||
# Simyo eSIM页面(完整版本)
|
||
from = "/simyo"
|
||
to = "/src/simyo/simyo_complete_esim.html"
|
||
status = 200
|
||
|
||
|
||
|
||
[[redirects]]
|
||
# 根路径重定向到选择页面
|
||
from = "/"
|
||
to = "/index.html"
|
||
status = 200
|
||
|
||
# API代理重定向(用于解决CORS问题)
|
||
[[redirects]]
|
||
from = "/api/simyo/*"
|
||
to = "https://appapi.simyo.nl/simyoapi/api/v1/:splat"
|
||
status = 200
|
||
force = true
|
||
headers = {X-Forwarded-Host = "appapi.simyo.nl"}
|
||
|
||
[[redirects]]
|
||
from = "/api/giffgaff/*"
|
||
to = "https://api.giffgaff.com/:splat"
|
||
status = 200
|
||
force = true
|
||
headers = {X-Forwarded-Host = "api.giffgaff.com"}
|
||
|
||
[[redirects]]
|
||
from = "/api/giffgaff-id/*"
|
||
to = "https://id.giffgaff.com/:splat"
|
||
status = 200
|
||
force = true
|
||
headers = {X-Forwarded-Host = "id.giffgaff.com"}
|
||
|
||
[[redirects]]
|
||
from = "/api/giffgaff-public/*"
|
||
to = "https://publicapi.giffgaff.com/:splat"
|
||
status = 200
|
||
force = true
|
||
headers = {X-Forwarded-Host = "publicapi.giffgaff.com"}
|
||
|
||
# 处理SPA路由(如果需要)
|
||
[[redirects]]
|
||
from = "/*"
|
||
to = "/index.html"
|
||
status = 404
|
||
|
||
# 安全头部
|
||
[[headers]]
|
||
for = "/*"
|
||
[headers.values]
|
||
X-Frame-Options = "DENY"
|
||
X-XSS-Protection = "1; mode=block"
|
||
X-Content-Type-Options = "nosniff"
|
||
Referrer-Policy = "strict-origin-when-cross-origin"
|
||
Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; img-src 'self' data: https: http:; connect-src 'self' https://api.qrserver.com https://appapi.simyo.nl https://api.giffgaff.com https://id.giffgaff.com https://publicapi.giffgaff.com; font-src 'self' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com;" |