From 043d93dcc476e5eb3962fdbe0f6a81b937122647 Mon Sep 17 00:00:00 2001 From: N3WT DE COMPET Date: Sun, 1 Jun 2025 13:21:14 +0200 Subject: [PATCH] fix: ajout des urls prod et demo --- Front-End/next.config.mjs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Front-End/next.config.mjs b/Front-End/next.config.mjs index cc678bb..01cf87a 100644 --- a/Front-End/next.config.mjs +++ b/Front-End/next.config.mjs @@ -5,9 +5,6 @@ const pkg = require('./package.json'); const withNextIntl = createNextIntlPlugin(); -const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080'; -const apiUrlObj = new URL(apiUrl); - /** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone', @@ -22,9 +19,17 @@ const nextConfig = { hostname: 'www.gravatar.com', }, { - protocol: apiUrlObj.protocol.replace(':', ''), - hostname: apiUrlObj.hostname, - ...(apiUrlObj.port ? { port: apiUrlObj.port } : {}), + protocol: 'https', + hostname: 'api.demo.n3wtschool.com', + }, + { + protocol: 'https', + hostname: 'api.prod.n3wtschool.com', + }, + { + protocol: 'http', + hostname: 'localhost', + port: '8080', }, ], },