Commit d1a80c88 by Arjun Jhukal

updated the next config rewrite rules

parent 500717a6
...@@ -17,6 +17,14 @@ const nextConfig: NextConfig = { ...@@ -17,6 +17,14 @@ const nextConfig: NextConfig = {
}, },
], ],
}, },
async rewrites() {
return [
{
source: '/api/backend/:path*', // Requests to /api/backend/* from your frontend
destination: 'https://app.bdwebai.com/api/:path*', // Will be rewritten to your Laravel API
},
];
},
}; };
export default nextConfig; export default nextConfig;
...@@ -13,7 +13,6 @@ export const baseQuery = fetchBaseQuery({ ...@@ -13,7 +13,6 @@ export const baseQuery = fetchBaseQuery({
headers.set("Authorization", `Bearer ${token}`); headers.set("Authorization", `Bearer ${token}`);
} }
return headers; return headers;
}, },
}); });
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