diff --git a/backend/server.js b/backend/server.js index e571d69..f8deaf3 100644 --- a/backend/server.js +++ b/backend/server.js @@ -2852,6 +2852,15 @@ function normalizeClientIp(rawIp) { return ip; } +function getClientIp(req) { + return normalizeClientIp( + req?.ip + || req?.socket?.remoteAddress + || req?.connection?.remoteAddress + || '' + ); +} + function parseShareIpWhitelist(rawValue) { if (typeof rawValue !== 'string') return []; return rawValue