From cfab2e35d862439fb6fa38cb2987546637525e73 Mon Sep 17 00:00:00 2001 From: dusk Date: Thu, 31 Oct 2024 16:57:57 +0300 Subject: [PATCH] feat: improve logging of host ips --- src/routes/+layout.server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts index 10dd732..0cc7f91 100644 --- a/src/routes/+layout.server.ts +++ b/src/routes/+layout.server.ts @@ -26,7 +26,8 @@ export async function load({ request, cookies, url, setHeaders, fetch }) { }).then(async (resp) => { if (resp !== null) { const msg = await resp.json() - console.log(`sent visitor analytic to dark visitors: ${resp.statusText}; ${msg.message}`) + const host = `(${request.headers.get('host')} ${request.headers.get('x-real-ip')})` + console.log(`sent visitor analytic to dark visitors: ${resp.statusText}; ${msg.message ?? ''}${host}`) } })