Vite, Next.js and other dev servers
Dev servers often refuse requests for host names they don't know. Here is how to let your Buundo address in.
Vite: "Blocked request. This host is not allowed."
// vite.config.js
export default {
server: { allowedHosts: [".buundo.dev"] },
}
Then buundo http 5173. Hot reload works, because Buundo carries WebSockets.
webpack dev server / Create React App: "Invalid Host header"
// webpack.config.js
devServer: { allowedHosts: [".buundo.dev"] }
# Create React App: in .env
DANGEROUSLY_DISABLE_HOST_CHECK=true
Next.js
next dev usually works as is: buundo http 3000. If you use allowedDevOrigins, add your address to it.
Any server: rewrite the host
If you can't change the settings, make Buundo send the name your server expects:
buundo http 5173 --host-header localhost
Django, Laravel, Rails
- Django: add
".buundo.dev"toALLOWED_HOSTSandCSRF_TRUSTED_ORIGINS(with https://). - Laravel:
php artisan serve --port 8000, thenbuundo http 8000; setAPP_URLto your Buundo address for correct links. - Rails 6+:
config.hosts << ".buundo.dev".