34 lines
697 B
TypeScript
34 lines
697 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const subDomain =
|
|
process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13001";
|
|
|
|
const nextConfig: NextConfig = {
|
|
async rewrites() {
|
|
return {
|
|
beforeFiles: [
|
|
{
|
|
source: "/_next/static/:path*",
|
|
destination: `${subDomain}/_next/static/:path*`,
|
|
has: [
|
|
{
|
|
type: "header",
|
|
key: "referer",
|
|
value: "(.*)/pst(.*)",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
afterFiles: [
|
|
{
|
|
source: "/pst/:path*",
|
|
destination: `${subDomain}/pst/:path*`,
|
|
},
|
|
],
|
|
fallback: [],
|
|
};
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|