feat: 前端使用环境变量重写api路径host
This commit is contained in:
@@ -10,7 +10,7 @@ const nextConfig: NextConfig = {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: 'http://localhost:3001/api/:path*',
|
||||
destination: `${process.env.API_BASE}/api/:path*`,
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user