req.connection.remoteAddress is deprecated

(cherry picked from commit 74f4849144)
This commit is contained in:
Girish Ramakrishnan
2025-01-29 10:35:09 +01:00
parent f15b7dd75c
commit 1a73ddea23
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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);