diff --git a/app/next.config.ts b/app/next.config.ts index 35a9619..e8eacbc 100644 --- a/app/next.config.ts +++ b/app/next.config.ts @@ -1,5 +1,7 @@ import type { NextConfig } from "next"; +const OXCODE = "https://www.oxcode.ai"; + const nextConfig: NextConfig = { reactCompiler: true, // Proxy tier2 streaming tool requests directly to the Python runner, @@ -13,6 +15,15 @@ const nextConfig: NextConfig = { }, ]; }, + async redirects() { + return [ + // Root needs its own rule: the catch-all param below cannot match an empty path. + { source: "/", destination: OXCODE, permanent: false }, + // api/ is excluded because redirects run before rewrites — catching it + // would disable the tool route handler and the streaming proxy above. + { source: "/:path((?!api/).*)", destination: OXCODE, permanent: false }, + ]; + }, }; export default nextConfig;