Refactor: Improve error handling in authentication flow
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const path = require('path');
|
||||
|
||||
const nextConfig = {
|
||||
webpack: (config) => {
|
||||
config.resolve.alias['@'] = path.join(__dirname, 'src');
|
||||
config.parallelism = 1;
|
||||
return config;
|
||||
},
|
||||
output: 'standalone',
|
||||
allowedDevOrigins: ['172.20.1.238'],
|
||||
async rewrites() {
|
||||
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001';
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: `${process.env.NEXT_PUBLIC_API_URL}/api/:path*`,
|
||||
destination: `${apiUrl}/api/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/webhooks/:path*',
|
||||
destination: `${process.env.NEXT_PUBLIC_API_URL}/webhooks/:path*`,
|
||||
destination: `${apiUrl}/webhooks/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user