fix: ajout des urls prod et demo

# Message de commit (conventionnel) :
#  Construction automatique depuis une branche aux formats:
#  - <type>-<ticket-id>-ma_super_description
#  - <type>-ma_super_description
# <type>(<scope>): <description> [#<ticket-id>]
# ex : feat(frontend): ajout de la gestion des utilisateurs dans le dashboard [#1]
#
# Types:
# - feat: Nouvelle fonctionnalité
# - fix: Correction de bug
# - docs: Documentation
# - style: Changements esthétiques
# - refactor: Refactorisation
# - test: Ajout/modification de tests
# - chore: Tâches diverses (e.g., mise à jour des dépendances)
#
# Scope: Optionnel (ex. backend, frontend, api, ci )
#
# Ticket ID: Référence à un ticket ou une issue (ex. [#123])
This commit is contained in:
N3WT DE COMPET
2025-06-01 13:21:14 +02:00
parent 6bc24055cd
commit b780e8b4ff
3 changed files with 13 additions and 8 deletions

View File

@ -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',
},
],
},