Files
hyperframes/docs
Dextheking1 89011e1c01 fix(studio): scheme-aware origin check, allowedHosts option
sameOriginPost compares the Origin against the request's own origin in a
scheme-aware way: the scheme comes from the request URL, or from
x-forwarded-proto when a TLS proxy supplies it, and x-forwarded-host is
honored for tunnels that rewrite Host. An https origin on the same host
now passes, where every write behind a TLS proxy 403d before.

createStudioApi gains an allowedHosts option naming extra hosts the
guard accepts, for hosts mounting the API on their own domain. Default
is unchanged: loopback, or the HYPERFRAMES_PREVIEW_HOST bind.

desktopRoutes drops its sameOriginPost re-export; its test imports the
shared subpath directly. Comments trimmed so the comment ratchet
passes. Docs note in docs/packages/studio-server.mdx.

Tests: origin guard suite 17/17 (6 new: https same-origin write,
forwarded proto, https origin on a plain http request, allowedHosts
accept and reject, tunnel with rewritten Host). Full studio-server
suite 1360 passed, 1 failed (history file-mode, fails on the base
commit too in this environment). CLI server suites 226 passed.
Typecheck, oxlint, oxfmt clean.
2026-10-24 18:15:03 +02:00
..
2026-10-23 06:32:30 +00:00