Files
pipelines/app/notes/F5.md
T

1.7 KiB

F5 preview server candidate review

Manager reran all 6 fixture tests and added an idle-websocket regression past the five-second establishment deadline. Healthy idle sockets now keep their session; auth-check listeners are removed when finished. Default preview port is 8096, separate from the raw API at 8080. HTTPS certificate paths remain untested.

Candidate e3a82b0's static preview route was retained, with stricter decoded path validation and canonical-path checks for files and SPA fallback. The proxy now uses http.request / https.request streams so Range, HEAD, content-encoding, and exact response bytes are preserved. Authentication checks fail closed after five seconds and discard their response bodies. Unauthenticated document GETs are redirected to the authenticated proxy's /login?next=...; assets remain 401. Login, logout, and artifact proxying still use the browser's upstream cookie.

WebSocket upgrades validate /connect and a same-origin browser Origin before authentication or upstream connection. After authentication, both Host and Origin map to the configured HTTP(S) upstream origin; cookies and upgrade headers are retained. Upgraded sockets are tracked and destroyed during close(). HTTPS uses Node TLS verification (no certificate bypass). Bind to loopback by default.

Verification: node --test test/tool/preview.test.mjs, node --check on server and test, and git diff --check. Tests use only local fixtures and cover login redirect, denied auth, exact compressed Range/HEAD bytes, origin rejection, authenticated bidirectional WebSocket bytes, timeout, shutdown, and traversal / symlink protection. No browser run, Flutter build, production access, or deployment was done.