fix: restore login by defining getClientIp helper
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user