fix: use VITE_ALLOWED_HOSTS env var, default to 'all'
This commit is contained in:
@@ -14,7 +14,9 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
port: 3000,
|
port: 3000,
|
||||||
open: true,
|
open: true,
|
||||||
allowedHosts: 'all',
|
allowedHosts: process.env.VITE_ALLOWED_HOSTS
|
||||||
|
? process.env.VITE_ALLOWED_HOSTS.split(',')
|
||||||
|
: 'all',
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://localhost:5001',
|
target: 'http://localhost:5001',
|
||||||
|
|||||||
Reference in New Issue
Block a user