Files
hyperframes/packages
James RussoandClaude Opus 5.5 b0835262ae fix(studio): check Host on the dev server's API routes and honor preview allowed hosts (#7493)
* fix(studio): check Host on the dev server's API routes and honor preview allowed hosts

The Studio Vite dev server now applies the same Host rule as the CLI
preview server to the routes its plugin serves (/api/*,
/__hyperframes_config), registered ahead of the plugin's other
middleware, and also accepts the IP-literal and configured hosts Vite
allows by default. HYPERFRAMES_PREVIEW_ALLOWED_HOSTS is now fed into
Vite's server.allowedHosts, so a host listed there loads the Studio page
as well as passing the API's checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(studio): accept the *.localhost and leading-dot hosts Vite serves on the API routes too

The dev server's API Host check was stricter than Vite's own rule, so a page
Vite served on studio.localhost or under a leading-dot allowed host got a 403
from every /api call. The check now applies Vite's rule alongside the CLI's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:43:59 +00:00
..
2026-11-10 12:14:01 +00:00
2026-11-10 12:14:01 +00:00
2026-11-10 12:14:01 +00:00
2026-11-10 12:14:01 +00:00
2026-11-10 12:14:01 +00:00
2026-11-10 12:14:01 +00:00
2026-11-10 12:14:01 +00:00
2026-11-10 12:14:01 +00:00