+ Приведены все функции приложения в рабочий вид
+ Наведен порядок в файлах проекта + Наведен порядок в документации + Настроены скрипты установки, развертки и так далее, расширен MakeFile
This commit is contained in:
@@ -5,55 +5,52 @@ const nextConfig = {
|
||||
{
|
||||
protocol: 'http',
|
||||
hostname: 'web',
|
||||
port: '8000',
|
||||
pathname: '/storage/**',
|
||||
port: '8000', // where Django serves media
|
||||
pathname: '/storage/**', // storage/avatars, images/link_groups, etc.
|
||||
},
|
||||
{
|
||||
protocol: 'http',
|
||||
hostname: '127.0.0.1',
|
||||
port: '8000',
|
||||
pathname: '/storage/**',
|
||||
port: '8000', // where Django serves media
|
||||
pathname: '/storage/**', // storage/avatars, images/link_groups, etc.
|
||||
},
|
||||
{
|
||||
protocol: 'http',
|
||||
hostname: 'localhost',
|
||||
port: '8000',
|
||||
pathname: '/storage/**',
|
||||
port: '8000', // where Django serves media
|
||||
pathname: '/storage/**', // storage/avatars, images/link_groups, etc.
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// proxy all /api/* calls to Django
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*/',
|
||||
destination: 'http://web:8000/api/:path*/',
|
||||
},
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: 'http://web:8000/api/:path*',
|
||||
destination: 'http://web:8000/api/:path*/',
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
eslint: {
|
||||
// Предупреждение: это позволяет продакшн сборки завершаться успешно даже если
|
||||
// ваш проект имеет ошибки ESLint.
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
typescript: {
|
||||
// Опасно: это позволяет продакшн сборки завершаться успешно даже если
|
||||
// ваш проект имеет ошибки TypeScript.
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
|
||||
// Добавляем настройки для правильной работы в development
|
||||
trailingSlash: false,
|
||||
skipTrailingSlashRedirect: 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' },
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
module.exports = nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user