Files
scan-sfera/next.config.js
2025-07-19 17:56:06 +03:00

63 lines
1.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
images: {
unoptimized: true,
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
remotePatterns: [
{
protocol: 'https',
hostname: '**.wbbasket.ru',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '**.wbstatic.net',
port: '',
pathname: '/**',
},
],
formats: ['image/webp'],
minimumCacheTTL: 60,
},
// Увеличиваем таймаут для API запросов
experimental: {
serverActions: {
bodySizeLimit: '2mb',
},
},
// Настройки прокси для решения проблемы с CORS
async rewrites() {
return [
{
source: '/api/:path*',
destination: '/api/:path*',
},
// Прямой доступ к статическим файлам
{
source: '/images/:path*',
destination: '/images/:path*',
},
];
},
// Повышаем лимит времени обработки запросов
serverRuntimeConfig: {
responseLimit: '5mb',
bodyParser: {
sizeLimit: '5mb',
},
},
// Настройки для оптимизации и кэширования
staticPageGenerationTimeout: 180,
distDir: '.next',
// Отключаем строгий режим для изображений
typescript: {
ignoreBuildErrors: false,
},
};
module.exports = nextConfig;