perf: add database indexes & minor frontend/backend improvements (#2396)

This commit is contained in:
fallenbagel
2026-02-09 17:06:53 +05:00
committed by GitHub
parent 186998b888
commit a44a3b1e14
11 changed files with 389 additions and 9 deletions

View File

@@ -165,12 +165,15 @@ app
try {
const descriptor = Object.getOwnPropertyDescriptor(req, 'ip');
if (descriptor?.writable === true) {
(req as any).ip = getClientIp(req) ?? '';
Object.defineProperty(req, 'ip', {
...descriptor,
value: getClientIp(req) ?? '',
});
}
} catch (e) {
logger.error('Failed to attach the ip to the request', {
label: 'Middleware',
message: e.message,
message: (e as Error).message,
});
} finally {
next();