Registry Mirror
Skip to content

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Fixes #2032

The Inbox's / through the tailnet listener ("Over your tailnet") now goes through the shared packages/shared/app-html.ts helper that remote-mode and --tailscale sessions use (#1617): brotli q5 / gzip 6 negotiated on Accept-Encoding, Vary: Accept-Encoding, brotli prewarmed when the tailnet listener opens.

  • Built inbox.html: 21,793,763 bytes → 5,099,373 br (≈0.2 s once) / 5,831,139 gzip.
  • Cache: private, no-cache plus a weak ETag of the page (304 on If-None-Match), so a repeat open from a phone costs a revalidation, not the body; no-cache still asks each time, so a restart to update is never missed.
  • Unchanged: the loopback port (uncompressed, no-store; compression only adds latency there), every data route (no-store), and the listener's owner-login / Host / Sec-Fetch-Site checks, which run before the page. The device door serves no HTML.

Tests: new case in packages/server/inbox-tailscale.test.ts (br and gzip decode to the page, identity, Vary, ETag + 304, HEAD, refusals still first, data routes, loopback unchanged). Ran inbox-tailscale, inbox, inbox-notify-origin, inbox-devices, app-html tests and bun run typecheck.

The tailnet listener's / goes through the shared app-html helper (br/gzip on
Accept-Encoding, Vary, brotli prewarmed when the listener opens) with
private, no-cache and a weak ETag so a repeat open revalidates with a 304.
Loopback keeps the uncompressed no-store page; data routes stay no-store.
@backnotprop
backnotprop merged commit 6d17095 into main Oct 21, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inbox over --tailscale is served uncompressed and no-store (follow-up to #1617 / #1619)

1 participant