992debb603
- Remove the NEXT_PUBLIC_API_URL from the production environment file. - Change axios base URL to use a local proxy endpoint. - Add rewrites in next.config.mjs to route API requests through the proxy.
39 lines
775 B
JavaScript
39 lines
775 B
JavaScript
/** @type {import("next").NextConfig} */
|
|
const nextConfig = {
|
|
output: "standalone",
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "cdn.sanity.io",
|
|
port: "",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "lh3.googleusercontent.com",
|
|
port: "",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "avatars.githubusercontent.com",
|
|
port: "",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "pub-b7fd9c30cdbf439183b75041f5f71b92.r2.dev",
|
|
port: "",
|
|
},
|
|
],
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/api/proxy/:path*",
|
|
destination: `https://admin.opplenz.com/admin/v1/:path*`,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|