fix: use VITE_ALLOWED_HOSTS env var, default to 'all'

This commit is contained in:
Kunthawat Greethong
2026-06-17 11:55:56 +07:00
parent 0cdcc79125
commit 26cdd14881

View File

@@ -14,7 +14,9 @@ export default defineConfig({
server: {
port: 3000,
open: true,
allowedHosts: 'all',
allowedHosts: process.env.VITE_ALLOWED_HOSTS
? process.env.VITE_ALLOWED_HOSTS.split(',')
: 'all',
proxy: {
'/api': {
target: 'http://localhost:5001',