diff --git a/server/server.ts b/server/server.ts index 211850d..f9d13d1 100644 --- a/server/server.ts +++ b/server/server.ts @@ -83,7 +83,10 @@ app.get("/js/script.js", async (c) => { app.post("/api/event", (c) => { const request = new Request(c.req.raw); request.headers.delete("Cookie"); - request.headers.set("X-Forwarded-For", c.req.header("host") || ""); + request.headers.set( + "X-Forwarded-For", + c.req.header("X-Forwarded-For") || "unknown", + ); return fetch("https://plausible.io/api/event", request); });