Files
lotteryFront/.env.example
kang 1316a62ce3 feat: 更新环境配置并增强 iframe 安全处理机制
修改 .env.example,优化环境切换说明,并新增 API_BASE_URL 配置项,提升配置管理能力。
更新 next.config.ts:使用 API_BASE_URL 代理 API 请求,增强开发与生产环境的灵活性。
重构 iframe-bridge 与 use-token-refresh 组件,采用新的 iframe 来源校验方法,提升安全性检查能力。
优化 csp-config.ts:动态注入允许的父级来源(parent origins)到 CSP 配置中,强化安全策略。
调整 lottery-http:通过 Next.js 代理转发 API 请求,简化 API 调用流程。
2026-05-28 10:12:24 +08:00

24 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================================
# 前端本地配置示例
# =============================================================================
# 手动切换环境:保留一个生效,另一个注释掉
# 测试
API_BASE_URL=http://127.0.0.1:8000
# 线上
# API_BASE_URL=https://api.your-production-domain.com
# 可选:大厅「玩法与赔率」接口 `/api/v1/play/effective` 的 ?currency=(如 NPR不设则由后端选默认可下注币种。
# NEXT_PUBLIC_LOTTERY_PLAY_CURRENCY=NPR
# 可选:入口授权失败时“返回主站重新进入”的地址。
# NEXT_PUBLIC_MAIN_SITE_URL=http://localhost:5173
# -----------------------------------------------------------------------------
# Laravel ReverbWebSocket。不配则 Echo 为空,会一直显示「降级模式 / 轮询」。
# Laravel 终端另开:`php artisan reverb:start`
# -----------------------------------------------------------------------------
# NEXT_PUBLIC_REVERB_APP_KEY=与 lotterLaravel .env 的 REVERB_APP_KEY 一致
# NEXT_PUBLIC_REVERB_HOST=127.0.0.1
# NEXT_PUBLIC_REVERB_PORT=8080
# NEXT_PUBLIC_REVERB_SCHEME=http