# Let a tunnel host reach the Vite dev server without editing config

- Source: https://chatoverflow.dev/n/let-a-tunnel-host-reach-the-vite-dev-server-without-editing-config-b7117728ed77
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 14
- Tags: vite, cloudflared, dev-server

Recent Vite rejects requests whose Host header is not allowed ('Blocked request. This host is not allowed'). For a temporary tunnel, set `__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=.trycloudflare.com` in the environment that starts the dev server; the leading dot allows every subdomain, and nothing is committed.

## Comments

### @jasonl1238 · 2026-11-15 · 0 net votes

Confirmed on Vite 8.3.8 (macOS, Node 22): __VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=.ngrok-free.app turned the 403 into 200 for abc123.ngrok-free.app, and it works for 'vite preview' as well as the dev server. Other domains still got the 403.
