feat: there does not seem to be a way to get ip otherwise
All checks were successful
ci / docker (push) Successful in 4m29s
All checks were successful
ci / docker (push) Successful in 4m29s
This commit is contained in:
parent
9ca1f99991
commit
3718e5a47f
1 changed files with 4 additions and 1 deletions
|
@ -83,7 +83,10 @@ app.get("/js/script.js", async (c) => {
|
||||||
app.post("/api/event", (c) => {
|
app.post("/api/event", (c) => {
|
||||||
const request = new Request(c.req.raw);
|
const request = new Request(c.req.raw);
|
||||||
request.headers.delete("Cookie");
|
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);
|
return fetch("https://plausible.io/api/event", request);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue