36 lines
851 B
TypeScript
36 lines
851 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
output: "standalone",
|
|
reactCompiler: true,
|
|
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/contact-senario/:path*",
|
|
destination: `${process.env.CONTACT_SERVER}/contact-senario/:path*`,
|
|
},
|
|
];
|
|
},
|
|
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/api/external/:path*",
|
|
headers: [
|
|
{key: "Access-Control-Allow-Credentials", value: "true"},
|
|
{key: "Access-Control-Allow-Origin", value: "*"},
|
|
{key: "Access-Control-Allow-Methods", value: "GET,POST,PUT,PATCH,DELETE"},
|
|
{
|
|
key: "Access-Control-Allow-Headers",
|
|
value: "Content-Type, Authorization, X-Requested-With",
|
|
},
|
|
],
|
|
},
|
|
]
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|