refactor: 更新环境配置与 API 代理逻辑

- 修改 .env.example,优化玩家端配置说明,明确本地与线上环境的使用方式。
- 重构 API 代理逻辑,移除过时的开发代理文件,统一使用 Next.js 代理 API 请求。
- 更新 CSP 配置,简化连接来源说明,提升安全性。
- 调整 lottery-api-base.ts 中的注释,增强代码可读性。
This commit is contained in:
2026-05-29 15:55:19 +08:00
parent 2bc1d4748a
commit 4fc2b38a40
6 changed files with 68 additions and 20 deletions

View File

@@ -1,12 +1,12 @@
import { type NextRequest } from "next/server";
import { proxyLotteryApiInDev } from "@/lib/lottery-api-dev-proxy";
import { proxyLotteryApi } from "@/lib/lottery-api-proxy";
type RouteContext = { params: Promise<{ path: string[] }> };
async function handle(request: NextRequest, context: RouteContext) {
const { path } = await context.params;
return proxyLotteryApiInDev(request, path);
return proxyLotteryApi(request, path);
}
export const GET = handle;