You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f318d3d
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(studio-server): refuse cross-origin writes and unknown hosts on the preview server (heygen-com#7490)
* fix(studio-server): reject cross-origin state-changing requests
Non-GET routes in createStudioApi answer 403 unless the shared
sameOriginPost predicate (lifted into studio-server's ./request-identity
subpath) accepts the request: the Host must be a server identity, a
present Sec-Fetch-Site must be same-origin, and a present Origin must
match the effective host and scheme. Hosts behind Codespaces or tunnels
allow their public name with HYPERFRAMES_PREVIEW_ALLOWED_HOSTS, read by
`hyperframes preview` and the Studio dev server.
Squashed from heygen-com#6128 (42574a7, 110a300, 89011e1, 41c6626, 27193bb) onto
current main.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(cli): the preview server answers only the hosts it is reached by
Every route of `hyperframes preview` (the forwarded studio API, the SSE
stream, /__hyperframes_config and the Studio page) now answers only
loopback names, the HYPERFRAMES_PREVIEW_HOST bind, or a host listed in
HYPERFRAMES_PREVIEW_ALLOWED_HOSTS, the same list the write guard uses.
Only the Host header counts here, since a page can set X-Forwarded-Host
on its own requests and a read carries no Origin to compare it with.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Dextheking1 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
0 commit comments