RTL/server/utils
saubyk 1efaa24d72 Address review: CSV-encode array form fields and bound request timeout
Review feedback on #1638 flagged two issues in the wrapper:

1. Array form values (eclair's ignoreNodeIds on findroutebetweennodes)
   encoded as "ignoreNodeIds=a,b" via String(), and worse, an empty
   array produced "ignoreNodeIds=" which Eclair's pubkey list parser
   rejects - breaking the default findroute path that worked under
   request-promise (qs omitted empty arrays). Arrays are now omitted
   when empty and comma-joined when not, matching Eclair's CsvSeq list
   format. Verified against the fixture: route eclair->bob->carol is
   found with an empty ignore list and disappears when bob is ignored.
   Under request-promise's qs indexed encoding (ignoreNodeIds[0]=...)
   Eclair never matched the field name, so the ignore list was silently
   dropped; this change makes it effective for the first time.

2. The shared transport had no request timeout, so a hung upstream
   held connections open indefinitely. Added a 10-minute bound,
   sized to the slowest legitimate operations (LND's /v2/router/send
   streams up to timeout_seconds=600; slow CLN channel operations get
   req.setTimeout(600000) upstream).

Both API suites (31 read + 12 write checks) re-pass on the fixture.
2026-07-19 22:01:23 -07:00
..
app.ts Release 0.15.1 (#1406) 2024-06-10 12:40:37 -07:00
authCheck.ts Release 0.15.1 (#1406) 2024-06-10 12:40:37 -07:00
common.ts Replace deprecated request/request-promise with axios 2026-07-19 22:01:23 -07:00
config.ts Add Disable Authentication option in the backend 2026-07-19 22:01:23 -07:00
cors.ts Release 0.15.1 (#1406) 2024-06-10 12:40:37 -07:00
csrf.ts Release 0.15.1 (#1406) 2024-06-10 12:40:37 -07:00
database.ts Release 0.15.1 (#1406) 2024-06-10 12:40:37 -07:00
logger.ts Release 0.15.1 (#1406) 2024-06-10 12:40:37 -07:00
request.ts Address review: CSV-encode array form fields and bound request timeout 2026-07-19 22:01:23 -07:00
webSocketServer.ts Release 0.15.1 (#1406) 2024-06-10 12:40:37 -07:00