• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zwave-js / zwave-js-ui / 25098177446
19%

Build:
DEFAULT BRANCH: master
Ran 29 Apr 2026 08:16AM UTC
Jobs 1
Files 70
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Apr 2026 08:15AM UTC coverage: 18.285% (-0.02%) from 18.3%
25098177446

push

github

web-flow
fix: socket reconnection loop and trust proxy validation error (#4604)

## Summary

Fixes two issues affecting users behind reverse proxies (notably the
Home Assistant addon).

### Socket reconnection loop (Fixes #4564)

When the server's auth middleware rejected a socket connection (e.g.
expired JWT), the client silently looped on reconnection forever.
Socket.IO v4 emits `connect_error` on rejected handshakes, but the
client only listened for `error`.

- `src/App.vue` — JWT expiry is checked client-side before attempting to
connect; an expired token triggers `logout()` instead of a connect
attempt.
- `src/App.vue` — added a `connect_error` handler. Three consecutive
auth failures trigger logout (single failures are tolerated to ride out
transient issues); other errors update status to *Reconnecting*.

### `ERR_ERL_UNEXPECTED_X_FORWARDED_FOR` validation error (Fixes #4535)

`express-rate-limit` emitted a noisy `ValidationError` on every restart
for users running behind a reverse proxy. The pre-existing `TRUST_PROXY`
env-var path looked correct but was effectively broken: `TRUST_PROXY=1`
was forwarded to `app.set('trust proxy', '1')` as a string, which
Express treats as the IP literal `"1"` — leaving trust proxy effectively
off and the validation error firing.

- `api/app.ts` — `parseTrustProxy()` coerces the raw env value:
`"true"`/`"false"` → boolean, numeric strings → hop count integer,
anything else → passed through verbatim (IP/CIDR list or preset name).
- `api/app.ts` — moved `app.set('trust proxy', ...)` into
`startServer()` via `configureTrustProxy()`, mirroring how HTTPS is
handled. Logs the resolved value at startup.
- `docs/guide/env-vars.md` — expanded the `TRUST_PROXY` description with
accepted formats and a note about `ERR_ERL_PERMISSIVE_TRUST_PROXY`
(don't set it to `true`; prefer an explicit hop count or IP list).

This pairs with home-assistant/addons#4597, which sets `TRUST_PROXY=1`
by default in the HA addon — that PR only actually r... (continued)

335 of 445 branches covered (75.28%)

Branch coverage included in aggregate %.

0 of 27 new or added lines in 1 file covered. (0.0%)

4054 of 23558 relevant lines covered (17.21%)

1.09 hits per line

Uncovered Changes

Lines Coverage ∆ File
27
0.0
0.0% api/app.ts
Jobs
ID Job ID Ran Files Coverage
1 25098177446.1 29 Apr 2026 08:16AM UTC 70
18.29
GitHub Action Run
Source Files on build 25098177446
  • Tree
  • List 70
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • aed2082a on github
  • Prev Build on master (#24998552396)
  • Next Build on master (#25098427218)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc