hex/src/local_api
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dax e14c03040a
feat(labs): browser access to the local API (#1756)
* feat(labs): let listed browser origins call the local API

A web page from an http(s) origin listed in Labs › Browser access to the
local API can call Hex's authenticated loopback API with fetch. Its
unauthenticated CORS preflight is answered 204 for that exact origin, and
every response — 401, 404, and SSE streams included — carries that origin
and Vary: Origin. Requests still need the bearer token; nothing allows
credentials or *. Off, a missing Origin, or an origin not listed answers
exactly as before.

Origins save as scheme://host[:port] only: *, null, paths, queries,
fragments, and userinfo are dropped, a trailing / and a default port are
normalized away, and the scheme and host are lowercased.

* fix(local_api): refuse CORS for a duplicate Origin without rejecting it

A request with two Origin headers is routed exactly as before this lab
existed (401 unauthenticated, 200 authenticated) but never earns CORS
headers. The Labs origins field keeps exactly what was typed through its
own debounced save, so a port or trailing comma is never rewritten under
the caret. Docs name the pre-request errors that carry no CORS headers and
how IPv6 and non-ASCII origins are written.
2026-11-12 19:13:01 -05:00
..
cors.rs feat(labs): browser access to the local API (#1756) 2026-11-12 19:13:01 -05:00
dictation.rs feat(labs): browser access to the local API (#1756) 2026-11-12 19:13:01 -05:00
discovery.rs add hex transcribe for saved wav files (labs) (#1579) 2026-11-09 06:51:42 -05:00
http.rs feat(labs): browser access to the local API (#1756) 2026-11-12 19:13:01 -05:00
meeting_events.rs feat(labs): browser access to the local API (#1756) 2026-11-12 19:13:01 -05:00
processing.rs local api: optional output processing behind a lab (#1597) 2026-11-09 10:35:05 -05:00
streams.rs feat(labs): browser access to the local API (#1756) 2026-11-12 19:13:01 -05:00
timestamps.rs local api: native segment and word timestamps behind a labs toggle (#1658) 2026-11-10 17:07:52 -05:00
transcriptions.rs local api: native segment and word timestamps behind a labs toggle (#1658) 2026-11-10 17:07:52 -05:00