diff --git a/app/layout.tsx b/app/layout.tsx
index 4174116d..d1cc180f 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -77,18 +77,18 @@ export default function RootLayout({
-
-
-
- {children}
- {/* Toaster and FloatingPlayer are global — toasts and
+
+
+
+ {children}
+ {/* Toaster and FloatingPlayer are global — toasts and
currently-playing audio survive navigation between
route groups. */}
-
-
-
-
-
+
+
+
+
+
@@ -97,7 +97,7 @@ export default function RootLayout({
next/script's defer-equivalent). Site-wide via the root layout,
loaded once across navigations. */}
diff --git a/next.config.ts b/next.config.ts
index e9c63aeb..5c2396d3 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -3,8 +3,20 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
turbopack: {
- root: "/"
- }
+ root: "/",
+ },
+ async rewrites() {
+ return [
+ {
+ source: "/api/script.js",
+ destination: `${process.env.NEXT_PUBLIC_RYBBIT_HOST}/api/script.js`,
+ },
+ {
+ source: "/api/track",
+ destination: `${process.env.NEXT_PUBLIC_RYBBIT_HOST}/api/track`,
+ },
+ ];
+ },
};
export default nextConfig;