test: rybbit proxy ip

This commit is contained in:
gosangam
2026-06-18 01:09:09 +05:30
parent b6dc762984
commit 0178f89f2b
2 changed files with 16 additions and 3 deletions
+4
View File
@@ -9,6 +9,10 @@ export async function POST(req: Request) {
headers.set("x-real-ip", ip);
headers.delete("host"); // avoid sending your app's Host to the Rybbit backend
console.log("XFF:", req.headers.get("x-forwarded-for"));
console.log("XRI:", req.headers.get("x-real-ip"));
console.log("resolved ip:", ip);
const res = await fetch(`${process.env.NEXT_PUBLIC_RYBBIT_HOST}/api/track`, {
method: "POST",
headers,