From f802854292553a7ba82c77869af29a6d39224ee6 Mon Sep 17 00:00:00 2001 From: Louis Mazin Date: Sat, 10 Oct 2026 20:44:16 +0200 Subject: [PATCH] test --- backend/core/settings.py | 10 +++------- frontend/vite.config.js | 6 ------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/backend/core/settings.py b/backend/core/settings.py index 19a1a14..55f750d 100644 --- a/backend/core/settings.py +++ b/backend/core/settings.py @@ -130,13 +130,9 @@ USE_TZ = True STATIC_URL = 'static/' -# CORS configuration -CORS_ALLOWED_ORIGINS = [ - "http://localhost:1028", - "http://127.0.0.1:1028", - "http://192.168.1.19:1028", - "https://boulangerie.louismazin.ovh" -] +CORS_ALLOWED_ORIGINS = config('ALLOWED_HOSTS', default='').split(',') +if not CORS_ALLOWED_ORIGINS or CORS_ALLOWED_ORIGINS == ['']: + CORS_ALLOWED_ORIGINS = ['*'] # REST Framework & JWT settings REST_FRAMEWORK = { diff --git a/frontend/vite.config.js b/frontend/vite.config.js index ac4f0e1..39b01c8 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -14,10 +14,4 @@ export default defineConfig({ '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, - - preview: { - allowedHosts: [ - 'boulangerie.louismazin.ovh', - ], - }, }) \ No newline at end of file