Compare commits

..

No commits in common. "17641d2b570755e8e5e7d71acb5f081af193b87f" and "01e41fd1f58b51beca486dd4b1cfbaebe5f29df8" have entirely different histories.

View File

@ -7,10 +7,31 @@ const nextConfig: NextConfig = {
includePaths: [path.join(__dirname, './src/styles')],
},
async rewrites() {
return [
{
source: '/:path*',
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`,
},
]
},
async headers() {
return [
{
source: '/api/:path*',
destination: `${process.env.NEXT_PUBLIC_API_URL}/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',
},
],
},
]
},