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