mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43: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 withNextIntl = createNextIntlPlugin();
|
||||||
|
|
||||||
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080';
|
|
||||||
const apiUrlObj = new URL(apiUrl);
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
@ -22,9 +19,17 @@ const nextConfig = {
|
|||||||
hostname: 'www.gravatar.com',
|
hostname: 'www.gravatar.com',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
protocol: apiUrlObj.protocol.replace(':', ''),
|
protocol: 'https',
|
||||||
hostname: apiUrlObj.hostname,
|
hostname: 'api.demo.n3wtschool.com',
|
||||||
...(apiUrlObj.port ? { port: apiUrlObj.port } : {}),
|
},
|
||||||
|
{
|
||||||
|
protocol: 'https',
|
||||||
|
hostname: 'api.prod.n3wtschool.com',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
protocol: 'http',
|
||||||
|
hostname: 'localhost',
|
||||||
|
port: '8080',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user