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
feat: add vite_allowed_hosts config option for Vite dev server (#6147)
* feat: add vite_allowed_hosts config option for Vite dev server
Add a configurable `vite_allowed_hosts` field to `rx.Config` that controls
whether `allowedHosts: true` is set in the Vite dev server configuration.
This allows users running Reflex in Docker, Codespaces, or behind a reverse
proxy to opt-in to allowing all hosts, preventing 403 Forbidden errors from
Vite's host header validation.
Default is `False` (original behavior, Vite only allows localhost).
Users can enable it in rxconfig.py:
config = rx.Config(app_name="myapp", vite_allowed_hosts=True)
Or via environment variable:
REFLEX_VITE_ALLOWED_HOSTS=true reflex run
* refactor: support bool | list[str] for vite_allowed_hosts
* feat: support union types in interpret_env_var_value
Instead of raising an error for union types, try each type in the union
in order and return the first successful interpretation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments