fix: Configure allowedHosts in astro.config.mjs only
- Removed separate vite.config.js - Added server and preview config directly to astro.config.mjs - Set allowedHosts: true to allow Easypanel hostnames - Set host: 0.0.0.0 for container networking
This commit is contained in:
@@ -1,17 +1,18 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
|
||||||
import tailwindcss from '@tailwindcss/vite';
|
import tailwindcss from '@tailwindcss/vite';
|
||||||
|
|
||||||
// https://astro.build/config
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [tailwindcss()],
|
plugins: [tailwindcss()]
|
||||||
server: {
|
},
|
||||||
allowedHosts: true // Allow all hosts for development
|
// Allow all hosts - required for Easypanel deployment
|
||||||
},
|
server: {
|
||||||
preview: {
|
host: '0.0.0.0',
|
||||||
allowedHosts: true // Allow all hosts for production preview
|
allowedHosts: true
|
||||||
}
|
},
|
||||||
|
preview: {
|
||||||
|
host: '0.0.0.0',
|
||||||
|
allowedHosts: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
import { defineConfig } from 'astro/config';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
server: {
|
|
||||||
allowedHosts: true // Allow all hosts (safe behind Easypanel proxy)
|
|
||||||
},
|
|
||||||
preview: {
|
|
||||||
allowedHosts: true // Allow all hosts for production preview
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user