From 1382b2fafc7a21ebfe0f4b95ead2b33dd1a4d908 Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Tue, 3 Mar 2026 10:46:53 +0700 Subject: [PATCH] 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 --- astro.config.mjs | 19 ++++++++++--------- vite.config.js | 10 ---------- 2 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 vite.config.js diff --git a/astro.config.mjs b/astro.config.mjs index 61e6ac01a..5cbcbd05e 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,17 +1,18 @@ // @ts-check import { defineConfig } from 'astro/config'; - import tailwindcss from '@tailwindcss/vite'; -// https://astro.build/config export default defineConfig({ vite: { - plugins: [tailwindcss()], - server: { - allowedHosts: true // Allow all hosts for development - }, - preview: { - allowedHosts: true // Allow all hosts for production preview - } + plugins: [tailwindcss()] + }, + // Allow all hosts - required for Easypanel deployment + server: { + host: '0.0.0.0', + allowedHosts: true + }, + preview: { + host: '0.0.0.0', + allowedHosts: true } }); diff --git a/vite.config.js b/vite.config.js deleted file mode 100644 index 669c19df3..000000000 --- a/vite.config.js +++ /dev/null @@ -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 - } -});