Files
MikrotikManager/next.config.ts
T

23 lines
732 B
TypeScript

import type { NextConfig } from "next";
import { backendInternalUrl } from "./lib/backend-internal-url";
const nextConfig: NextConfig = {
distDir: process.env.MM_NEXT_DIST_DIR || ".next",
output: "standalone",
experimental: {
proxyClientMaxBodySize: "512mb",
// Speed commands include RouterOS waits and post-test Ping; the UI allows 120s.
// Let the backend return its structured outcome before the rewrite times out.
proxyTimeout: 180_000,
},
async rewrites() {
const backendUrl = backendInternalUrl();
return [
{ source: "/health", destination: `${backendUrl}/health` },
{ source: "/api/:path*", destination: `${backendUrl}/api/:path*` },
];
},
};
export default nextConfig;