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:
Kunthawat Greethong
2026-03-03 10:46:53 +07:00
parent 70c0d9788f
commit 1382b2fafc
2 changed files with 10 additions and 19 deletions

View File

@@ -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
} }
}); });

View File

@@ -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
}
});