Files
links/.history/frontend/linktree-frontend/next.config_20250506162743.ts
2025-05-06 20:44:33 +09:00

27 lines
810 B
TypeScript

// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
// Если вам не нужно явное разрешение App Router — эту секцию можно убрать.
// experimental: { appDir: true },
// Протокол обязателен, указывайте точный origin, включая порт.
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;