Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 本地转发配置
Nevina10101cda724
diff --git a/next.config.mjs b/next.config.mjsindex e929a60f..ccd12fda 100644--- a/next.config.mjs+++ b/next.config.mjs@@ -18,14 +18,16 @@ const nextConfig = {},output: 'standalone',productionBrowserSourceMaps: process.env.NEXT_PUBLIC_EVN === 'dev',- // rewrites: async () => ({- // beforeFiles: [- // {- // source: `/api/:path*`,- // destination: "http://127.0.0.1:8000/api/:path*",- // },- // ],- // }),+ rewrites: async () => {+ if (process.env.NEXT_PUBLIC_EVN === 'local') {+ return [+ {+ source: `/api/:path*`,+ destination: "http://127.0.0.1:8000/api/:path*",+ },+ ];+ }+ },};const CorsHeaders = [