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

View File

@@ -29,7 +29,7 @@ async function authorizeApp(req, res, next) {
return next();
}
const [error, app] = await safe(apps.getByIpAddress(req.connection.remoteAddress));
const [error, app] = await safe(apps.getByIpAddress(req.socket.remoteAddress));
if (error) return next(new HttpError(500, error));
if (!app) return next(new HttpError(401, 'Unauthorized'));
if (!app.manifest.addons?.docker) return next(new HttpError(401, 'Unauthorized'));