/** @type {import('next').NextConfig} */ const nextConfig = { images: { remotePatterns: [ { protocol: 'http', hostname: 'web', port: '8000', pathname: '/storage/**', }, { protocol: 'http', hostname: '127.0.0.1', port: '8000', pathname: '/storage/**', }, { protocol: 'http', hostname: 'localhost', port: '8000', pathname: '/storage/**', }, ], }, async rewrites() { return [ { source: '/api/:path*', destination: 'http://web:8000/api/:path*', }, ]; }, eslint: { ignoreDuringBuilds: true, }, typescript: { ignoreBuildErrors: true, }, trailingSlash: false, skipTrailingSlashRedirect: true, async headers() { return [ { source: '/api/:path*', headers: [ { key: 'Access-Control-Allow-Origin', value: '*' }, { key: 'Access-Control-Allow-Methods', value: 'GET, POST, PUT, DELETE, OPTIONS' }, { key: 'Access-Control-Allow-Headers', value: 'Content-Type, Authorization' }, ], }, ]; }, }; export default nextConfig;