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 27193bb
Browse filesBrowse the repository at this point in the historyBrowse files
Dextheking1
authored and
Dextheking1
committed
feat(studio-server): read extra write hosts from HYPERFRAMES_PREVIEW_ALLOWED_HOSTS
The CLI preview server and the Studio dev server now read the comma
separated HYPERFRAMES_PREVIEW_ALLOWED_HOSTS and pass the names to
createStudioApi as allowedHosts, so a preview behind Codespaces port
forwarding or a tunnel accepts writes from its public host. The
parsing lives in requestIdentity, next to HYPERFRAMES_PREVIEW_HOST.
A refused write now names the refused host and the variable that
allows it, instead of a bare forbidden.
Tests: guard suite covers the refusal message and a forged
X-Forwarded-Host with a non-matching Origin; the CLI suite drives a
tunnel write through the /api/* forwarder with and without the
variable set.
// A loopback Host always passes. Any other Host passes only when the bind (HYPERFRAMES_PREVIEW_HOST) names it, or is a wildcard and the Host is a local name.
0 commit comments