init commit

This commit is contained in:
2025-05-06 20:44:33 +09:00
commit 91f0d54563
5567 changed files with 948185 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
// Все файлы из MEDIA_URL (/media/...)
{
protocol: 'http',
hostname: '127.0.0.1',
port: '8000', // <— вот!
pathname: '/media/**',
},
{
protocol: 'http',
hostname: 'localhost',
port: '8000',
pathname: '/media/**',
},
// Если у вас еще прямой доступ по /avatars/...
{
protocol: 'http',
hostname: '127.0.0.1',
port: '8000',
pathname: '/avatars/**',
},
{
protocol: 'http',
hostname: 'localhost',
port: '8000',
pathname: '/avatars/**',
},
],
},
// Разрешаем в деве обращения с вашего адреса
allowedDevOrigins: [
'http://localhost:3001',
'http://192.168.219.114:3001',
'http://0.0.0.0:3001',
'http://localhost:3000',
'http://192.168.219.114:3000',
],
// Проксируем все запросы /api/* на Django
async rewrites() {
return [
{
source: '/api/:path*', // локальный путь на фронте
destination: 'http://127.0.0.1:8000/api/:path*' // куда реально уходит запрос
}
]
},
};
module.exports = nextConfig;