import withPWA from 'next-pwa'; const config = { dest: 'public' }; const nextConfig = { output: 'standalone', images: { remotePatterns: [ { protocol: 'https', hostname: '**', port: '', pathname: '/**', }, ], }, async headers() { return [ { // matching all well-known routes source: "/.well-known/:path*", headers: [ // { key: "Access-Control-Allow-Credentials", value: "true" }, { key: "Access-Control-Allow-Origin", value: "*" }, { key: "Access-Control-Allow-Methods", value: "GET" }, // { key: "Access-Control-Allow-Headers", value: "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }, ] } ] } }; export default withPWA(config)(nextConfig);