feat(analytics): add Rybbit proxy rewrites and env vars
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:
Unchained
2026-03-31 05:17:57 +02:00
parent 511c3078c5
commit 56c05cc8fc
4 changed files with 22 additions and 6 deletions

View File

@@ -12,8 +12,8 @@ declare global {
}
}
export const RYBBIT_HOST = "https://rybbit.nodecrew.me";
export const RYBBIT_SITE_ID = "1";
export const RYBBIT_HOST = process.env.NEXT_PUBLIC_RYBBIT_HOST || "https://rybbit.nodecrew.me";
export const RYBBIT_SITE_ID = process.env.NEXT_PUBLIC_RYBBIT_SITE_ID || "1";
/**
* Check if Rybbit is loaded and available