new models, frontend functions, public pages
This commit is contained in:
@@ -5,29 +5,32 @@ const nextConfig = {
|
||||
{
|
||||
protocol: 'http',
|
||||
hostname: '127.0.0.1',
|
||||
port: '8000', // <-- обязательно 8000, где Django отдаёт медиа
|
||||
pathname: '/storage/**', // <-- подпапкиstorage/avatars, images/link_groups и т.д.
|
||||
port: '8000', // where Django serves media
|
||||
pathname: '/storage/**', // storage/avatars, images/link_groups, etc.
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
// Разрешаем в деве обращения с вашего адреса
|
||||
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
|
||||
// proxy all /api/* calls to Django
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*', // локальный путь на фронте
|
||||
destination: 'http://127.0.0.1:8000/api/:path*/' // куда реально уходит запрос
|
||||
}
|
||||
]
|
||||
source: '/api/:path*',
|
||||
destination: 'http://127.0.0.1:8000/api/:path*',
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
experimental: {
|
||||
// whitelist origins you’ll browse from in dev
|
||||
allowedDevOrigins: [
|
||||
'http://localhost:3001',
|
||||
'http://127.0.0.1:3001',
|
||||
'http://192.168.219.114:3001',
|
||||
'http://0.0.0.0:3001',
|
||||
'http://localhost:3000',
|
||||
'http://192.168.219.114:3000',
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user