/** @type {import('next').NextConfig} */
const DJANGO_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000";

const nextConfig = {
  async rewrites() {
    return [
      {
        source: "/backend/:path*",
        destination: `${DJANGO_URL}/:path*`,
      },
    ];
  },
};

export default nextConfig;
