File size: 521 Bytes
b42dfef
 
 
 
03232ae
 
b42dfef
 
 
 
 
 
 
 
 
 
 
 
 
47f2ebb
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'standalone',
  reactStrictMode: true,
  
  // Proxy cấu hình để frontend nói chuyện với backend
  async rewrites() {
    const API_HOST = process.env.BACKEND_HOST || 'http://localhost:8000';
    return [
      {
        source: '/api/:path*',
        destination: `${API_HOST}/api/:path*`,
      },
      {
        source: '/ws/:path*',
        destination: `${API_HOST}/ws/:path*`,
      },
    ];
  },
};

module.exports = nextConfig;