get real ip

This commit is contained in:
2025-07-22 00:14:21 +08:00
parent 622a1c1b00
commit a3264be5f6
4 changed files with 12 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ export function errorHandler(
stack: error.stack,
url: req.url,
method: req.method,
ip: req.ip,
ip: (req.headers['x-forwarded-for'] as string) || req.socket.remoteAddress,
userAgent: req.get('User-Agent')
});