Files
lotteryFront/next.config.ts
kang 14c297fe1a feat: 接入玩家入口与API代理
- 新增 /api 重写代理,支持 LOTTERY_API_PROXY_TARGET 配置
- 玩家首页切换为 EntryGate,并移除 layout 对 PlayerAppShell 的包裹
- 请求层拆分语言头与玩家鉴权注入逻辑,引入 zustand 依赖
- 允许提交 .env.example 供本地配置参考
2026-05-09 10:17:39 +08:00

20 lines
389 B
TypeScript

import type { NextConfig } from "next";
const lotteryApiProxyTarget =
process.env.LOTTERY_API_PROXY_TARGET?.trim() || "http://127.0.0.1:8000";
const nextConfig: NextConfig = {
reactCompiler: true,
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${lotteryApiProxyTarget}/api/:path*`,
},
];
},
};
export default nextConfig;