Preview pane blocks local dev-server assets (ERR_BLOCKED_BY_CLIENT) — needs a localhost allowlist
Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 29, 2026
The preview/Browser pane blocks sub-resources of a local dev site served under a custom hostname, so pages render unstyled.
Repro
- Run any Vite-based dev server locally (e.g. Nuxt 4 + Vite) on
127.0.0.1. - Front it with a custom local hostname instead of
localhost— a common dev setup: add a hosts entry so the name resolves to loopback (e.g./etc/hosts:127.0.0.1 myapp.test), and run a local reverse proxy (nginx/Caddy) that routesmyapp.test→ the dev server. Sohttp://myapp.test/is entirely local — the hostname is just an alias for127.0.0.1, nothing leaves the machine. - Open
http://myapp.test/in the preview pane.
Symptom
The document loads (HTTP 200), but every sub-resource fails with net::ERR_BLOCKED_BY_CLIENT:/_nuxt/@vite/client, virtual:nuxt:…css, /_nuxt/**/*.css, .pnpm/**/entry.async.js, /icon.png → the page renders unstyled.
Not a server or cert issue
- It's plain HTTP;
curl http://myapp.test/<asset>returns 200 with correct content-type/size for every asset. - The error is the pane's client-side content filter (
ERR_BLOCKED_BY_CLIENT), notERR_CERT_*— so it isn't a TLS/certificate problem. - It appears to over-match Vite dev-mode URLs (
@vite/client,virtual:,.pnpm/paths, the HMR websocket). A production build renders fine because its assets are plain hashed/_nuxt/<hash>.js|.csspaths.
Ask
A user-configurable way to relax this for local development — e.g. a settings.json key or /config toggle to disable content blocking for localhost/private hosts (127.0.0.1, *.localhost, custom hosts-mapped local TLDs, RFC1918 ranges), or a per-host allowlist.