fix: rybbit blocking using next rewrite

This commit is contained in:
gosangam
2026-06-07 00:52:49 +05:30
parent bcffe9684f
commit d5fb350652
2 changed files with 25 additions and 13 deletions
+14 -2
View File
@@ -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;