From 2928ef3c4500a35048158ebade45f3baa16027ba Mon Sep 17 00:00:00 2001 From: yourfriendoss Date: Sun, 2 Nov 2025 12:57:53 +0200 Subject: [PATCH] Bro what --- src/server.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/server.ts b/src/server.ts index e64f326..5f61ad3 100644 --- a/src/server.ts +++ b/src/server.ts @@ -148,15 +148,11 @@ app.post("/some-cool-endpoint", (req, res) => { } let path = "/"; - if (typeof e.path === "string" && e.path) { - path = e.path.startsWith("/") ? e.path : `/${e.path}`; - } else { - try { - if (e.url) { - path = new URL(e.url).pathname || "/"; - } - } catch (err) { + try { + if (e.url) { + path = new URL(e.url).pathname || "/"; } + } catch (err) { } eventCounter.labels(site, e.type, path, country, device, browser, os).inc();