next.config.js 326 B

12345678910111213141516
  1. /** @type {import('next').NextConfig} */
  2. const nextConfig = {
  3. reactStrictMode: true,
  4. // 反向代理 /api/* 到 FastAPI (localhost:8081)
  5. async rewrites() {
  6. return [
  7. {
  8. source: '/api/:path*',
  9. destination: 'http://localhost:8081/api/:path*',
  10. },
  11. ];
  12. },
  13. };
  14. module.exports = nextConfig;