import type { NextConfig } from "next"; const apiBaseUrl = process.env.API_BASE_URL?.trim() || "http://127.0.0.1:8000"; const nextConfig: NextConfig = { /* config options here */ allowedDevOrigins: ["192.168.0.101"], reactCompiler: true, async rewrites() { return [ { source: "/api/:path*", destination: `${apiBaseUrl}/api/:path*`, }, ]; }, async redirects() { return [ { source: "/admin/service-desk", destination: "/admin", permanent: true, }, { source: "/admin/menu-permissions", destination: "/admin", permanent: true, }, ]; }, }; export default nextConfig;