ehsan-dashboards/dashboards/VPN_chanel/frontend/next.config.mjs

27 lines
No EOL
561 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
},
],
},
async rewrites() {
const backendUrl = process.env.INTERNAL_BACKEND_URL || 'http://127.0.0.1:8000';
return [
{
source: '/api/:path*',
destination: `${backendUrl}/api/:path*`,
},
{
source: '/static/:path*',
destination: `${backendUrl}/static/:path*`,
},
];
},
};
export default nextConfig;