req.connection.remoteAddress is deprecated
(cherry picked from commit 74f4849144)
This commit is contained in:
+2
-2
@@ -545,7 +545,7 @@ function interactionLogin(provider) {
|
||||
return next(new HttpError(400, detailsError));
|
||||
}
|
||||
|
||||
const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress || null;
|
||||
const ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress || null;
|
||||
const userAgent = req.headers['user-agent'] || '';
|
||||
const clientId = details.params.client_id;
|
||||
|
||||
@@ -615,7 +615,7 @@ function interactionConfirm(provider) {
|
||||
return async function (req, res, next) {
|
||||
async function raiseLoginEvent(user, clientId) {
|
||||
try {
|
||||
const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress || null;
|
||||
const ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress || null;
|
||||
const userAgent = req.headers['user-agent'] || '';
|
||||
const auditSource = AuditSource.fromOidcRequest(req);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user