#Rate limiter does not strip port number from IP address

1 messages · Page 1 of 1 (latest)

simple ivy
#
ValidationError: An invalid 'request.ip' (186.131.132.10:27972) was detected. Consider passing a custom 'keyGenerator' function to the rate limiter. See https://express-rate-limit.github.io/ERR_ERL_INVALID_IP_ADDRESS/ for more information.
2025-03-13T10:56:29.2011645Z     at Object.ip (/app/api/node_modules/express-rate-limit/dist/index.cjs:132:13)
2025-03-13T10:56:29.2011683Z     at wrappedValidations.<computed> [as ip] (/app/api/node_modules/express-rate-limit/dist/index.cjs:362:22)
2025-03-13T10:56:29.2011711Z     at Object.keyGenerator (/app/api/node_modules/express-rate-limit/dist/index.cjs:615:20)
2025-03-13T10:56:29.2011736Z     at /app/api/node_modules/express-rate-limit/dist/index.cjs:670:32
2025-03-13T10:56:29.2011759Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-03-13T10:56:29.2011783Z     at async /app/api/node_modules/express-rate-limit/dist/index.cjs:650:5 {
2025-03-13T10:56:29.2011803Z   code: 'ERR_ERL_INVALID_IP_ADDRESS',

(IP address changed for privacy but otherwise log snippet is authentic). Not sure if this is a bug in the integration of the rate limiter and LibreChat, or within the ratelimiter. I'm also assuming its the port number, since the IP looks well formed otherwise.

dry adder
#

@simple ivy I got this error log too, did you have any idea about that?