Changeset 834bcc3 in Klonkt for src/middleware/rate-limit.js


Ignore:
Timestamp:
06/23/2026 06:14:27 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
d774679
Parents:
bb42dfb
Message:

i18n: translate Dutch code comments to English across src/

Comments in routes/services/views/config/middleware/assets translated to
English for the public repo. A few dev-facing throw/console message strings
were Englished too. No user-facing UI strings or i18n dictionary values changed
(src/services/i18n.js untouched). Logic unchanged.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/middleware/rate-limit.js

    rbb42dfb r834bcc3  
    1414import { renderPage } from './render.js';
    1515
    16 // Achter Cloudflare/Caddy kan req.ip binnenkomen als "1.2.3.4:11046" (IPv4 met
    17 // poort). express-rate-limit v7 valideert het IP en gooit anders
    18 // ERR_ERL_INVALID_IP_ADDRESS — onafgevangen async → het proces crasht (en pm2
    19 // loopt in een restart-loop). Strip een trailing IPv4-poort, val terug op de
    20 // socket, en laat IPv6 (meerdere dubbele punten) ongemoeid.
     16// Behind Cloudflare/Caddy, req.ip can arrive as "1.2.3.4:11046" (IPv4 with
     17// port). express-rate-limit v7 validates the IP and otherwise throws
     18// ERR_ERL_INVALID_IP_ADDRESS — uncaught async → the process crashes (and pm2
     19// enters a restart loop). Strip a trailing IPv4 port, fall back to the
     20// socket address, and leave IPv6 (multiple colons) untouched.
    2121function clientKey(req) {
    2222  let ip = req.ip || req.socket?.remoteAddress || '';
Note: See TracChangeset for help on using the changeset viewer.