feat: 前端使用环境变量重写api路径host

This commit is contained in:
2025-12-16 22:52:33 +08:00
parent 5ce34c4c95
commit 11f5360a52

View File

@@ -10,7 +10,7 @@ const nextConfig: NextConfig = {
return [
{
source: '/api/:path*',
destination: 'http://localhost:3001/api/:path*',
destination: `${process.env.API_BASE}/api/:path*`,
}
]
},