Commit ac8f024a by Arjun Jhukal

updated the dynamic backend url for the config

parent ed3a0c5f
...@@ -18,10 +18,11 @@ const nextConfig: NextConfig = { ...@@ -18,10 +18,11 @@ const nextConfig: NextConfig = {
], ],
}, },
async rewrites() { async rewrites() {
const backendUrl = process.env.NEXT_PUBLIC_BASE_URL || ""
return [ return [
{ {
source: '/api/backend/:path*', // Requests to /api/backend/* from your frontend source: '/api/backend/:path*',
destination: 'https://app.bdwebai.com/:path*', // Will be rewritten to your Laravel API destination: `${backendUrl}/:path*`,
}, },
]; ];
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment