feat(analytics): add Rybbit proxy rewrites and env vars
Some checks failed
Build and Deploy / build (push) Has been cancelled
Some checks failed
Build and Deploy / build (push) Has been cancelled
- Add Next.js rewrites to proxy /api/script.js and /api/track through self-hosted Rybbit - This bypasses ad blockers that would block rybbit.nodecrew.me directly - Add NEXT_PUBLIC_RYBBIT_HOST and NEXT_PUBLIC_RYBBIT_SITE_ID env vars to K8s deployment
This commit is contained in:
@@ -5,6 +5,19 @@ const withNextIntl = createNextIntlPlugin();
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'standalone',
|
||||
async rewrites() {
|
||||
const rybbitHost = process.env.NEXT_PUBLIC_RYBBIT_HOST || "https://rybbit.nodecrew.me";
|
||||
return [
|
||||
{
|
||||
source: "/api/script.js",
|
||||
destination: `${rybbitHost}/api/script.js`,
|
||||
},
|
||||
{
|
||||
source: "/api/track",
|
||||
destination: `${rybbitHost}/api/track`,
|
||||
},
|
||||
];
|
||||
},
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user