16 lines
400 B
JavaScript
16 lines
400 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
// Direct proxy for any /api requests to the backend
|
|
// This ensures frontend calls like /api/metrics correctly map to backend /api/metrics
|
|
source: '/api/:path*',
|
|
destination: 'http://127.0.0.1:8000/api/:path*',
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|