mirror of
https://gitlab.com/foxixus/neomovies.git
synced 2025-10-27 09:28:49 +05:00
75 lines
1.8 KiB
JavaScript
75 lines
1.8 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
compiler: {
|
|
styledComponents: true,
|
|
},
|
|
devIndicators: {
|
|
appIsrStatus: false,
|
|
buildActivity: false,
|
|
buildActivityPosition: 'bottom-right',
|
|
},
|
|
env: {
|
|
MONGODB_URI: process.env.MONGODB_URI,
|
|
JWT_SECRET: process.env.JWT_SECRET,
|
|
RESEND_API_KEY: process.env.RESEND_API_KEY,
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'image.tmdb.org',
|
|
pathname: '/**',
|
|
},
|
|
// Локальная разработка
|
|
{
|
|
protocol: 'http',
|
|
hostname: 'localhost',
|
|
port: '3000',
|
|
pathname: '/images/**',
|
|
},
|
|
// Наш API прокси для изображений
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'neomovies-test-api.vercel.app',
|
|
pathname: '/api/v1/images/**',
|
|
},
|
|
// Продакшен на Vercel (старый)
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'neomovies-test-api.vercel.app',
|
|
pathname: '/images/**',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'neo-movies.vercel.app',
|
|
pathname: '/images/**',
|
|
}
|
|
],
|
|
},
|
|
onDemandEntries: {
|
|
maxInactiveAge: 25 * 1000,
|
|
pagesBufferLength: 2,
|
|
},
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
experimental: {
|
|
scrollRestoration: 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' },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|