mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 15:33:22 +00:00
fix: ajout des urls prod et demo
This commit is contained in:
@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user