From fdd4dcd847082848cb3e08aa07a9ba875341d33d Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:06:11 +0500 Subject: [PATCH] refactor(api): more logging for ip forwarding during auth --- server/api/jellyfin.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/api/jellyfin.ts b/server/api/jellyfin.ts index f23e9aceb..f5a234178 100644 --- a/server/api/jellyfin.ts +++ b/server/api/jellyfin.ts @@ -133,6 +133,11 @@ class JellyfinAPI extends ExternalAPI { } : {}; + logger.debug(`Logging in to Jellyfin server: ${this.jellyfinHost}`, { + label: 'Jellyfin API', + ip: ClientIP, + }); + const authResponse = await this.post( '/Users/AuthenticateByName', { @@ -143,9 +148,17 @@ class JellyfinAPI extends ExternalAPI { headers: headers, } ); + logger.debug(`Logged in to Jellyfin server: ${this.jellyfinHost}`, { + label: 'Jellyfin API', + response: authResponse, + }); return authResponse; } catch (e) { + logger.debug(e, { + label: 'Jellyfin API', + }); + const status = e.response?.status; const networkErrorCodes = new Set([