From 9b0ecf18c7c8852b09868e7f678cea477db0d26a Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Sun, 9 Mar 2025 14:41:43 +0100 Subject: [PATCH] feat(config): update server settings and CORS options --- astro.config.mjs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index a6040c2..847a6f2 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -20,13 +20,24 @@ export default defineConfig({ vite: { plugins: [tailwindcss()], server: { - allowedHosts: ['jleibl.net'], - port: 4321 + host: '0.0.0.0', + allowedHosts: true, + cors: { + origin: '*', + methods: ['GET'], + allowedHeaders: ['X-Requested-With'] + } }, preview: { + host: '0.0.0.0', allowedHosts: ['jleibl.net'], - port: 4321 + port: 4321, + cors: { + origin: '*', + methods: ['GET'], + allowedHeaders: ['X-Requested-With'] + } } } }); \ No newline at end of file