import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  images: {
    remotePatterns: [
      { protocol: "http", hostname: "api.pubago.local" },
      { protocol: "http", hostname: "localhost" },
      { protocol: "https", hostname: "api.pubago.com" },
    ],
    // api.pubago.local résout en 127.0.0.1 (entrée hosts locale) : Next.js
    // bloque ça par défaut (protection SSRF). Sans danger ici car c'est
    // notre propre backend en dev, jamais activé en production.
    dangerouslyAllowLocalIP: process.env.NODE_ENV !== "production",
  },
};

export default nextConfig;
