import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  // Allow Shopify tunnel hosts to load Next.js dev assets
  allowedDevOrigins: [
    "barge-pupil-jot.ngrok-free.dev",
    "*.ngrok-free.dev",
    "*.ngrok-free.app",
    "*.ngrok.io",
  ],
  async headers() {
    return [
      {
        source: "/:path*",
        headers: [
          {
            key: "Content-Security-Policy",
            value:
              "frame-ancestors https://admin.shopify.com https://*.myshopify.com;",
          },
        ],
      },
    ];
  },
};

export default nextConfig;
