41 lines
860 B
TypeScript
41 lines
860 B
TypeScript
import type { NextConfig } from 'next'
|
|
import path from 'path'
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
sassOptions: {
|
|
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*',
|
|
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
|