const nextConfig = {
rewrites: async () => {
return [
{
source: "/api/:path*",
has: [
{
type: "header",
key: "x-shared-key",
},
],
destination:
process.env.NODE_ENV === "development"
? "http://127.0.0.1:8000/api/:path*"
: "/api",
},
];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "images.unsplash.com",
port: "",
pathname: "**",
}
],
},
};
module.exports = nextConfig;
const nextConfig = {
rewrites: async () => {
return [
{
source: "/api/:path*",
has: [
{
type: "header",
key: "x-shared-key",
},
],
destination:
process.env.NODE_ENV === "development"
? "http://127.0.0.1:8000/api/:path*"
: "/api",
},
];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "images.unsplash.com",
port: "",
pathname: "**",
}
],
},
};
module.exports = nextConfig;