From c3b2c10bdf8a7952091bac0962ddc7abd26bfcd4 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Fri, 17 Oct 2025 19:24:30 +0200 Subject: [PATCH] fix: replace hardcoded backend URL with environment variable for consistency --- apps/infoalloggi/next.config.mjs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/infoalloggi/next.config.mjs b/apps/infoalloggi/next.config.mjs index ff9ee3c..00e655e 100644 --- a/apps/infoalloggi/next.config.mjs +++ b/apps/infoalloggi/next.config.mjs @@ -5,8 +5,6 @@ import { env } from "node:process"; -const backendUrl = "http://localhost:1323"; - /** @type {import("next").NextConfig} */ const nextConfig = { compiler: { @@ -48,7 +46,7 @@ const nextConfig = { protocol: "https", }, { - hostname: backendUrl, + hostname: `${env.BACKENDSERVER_URL}`, }, ], }, @@ -61,11 +59,11 @@ const nextConfig = { source: "/api/panel", }, { - destination: `${backendUrl}/images/get/:slug*`, + destination: `${env.BACKENDSERVER_URL}/images/get/:slug*`, source: "/go-api/images/get/:slug*", }, { - destination: `${backendUrl}/storage/get/:slug*`, + destination: `${env.BACKENDSERVER_URL}/storage/get/:slug*`, has: [ { key: "access_token", type: "cookie" }, { @@ -78,7 +76,7 @@ const nextConfig = { source: "/go-api/storage/get/:slug*", }, { - destination: `${backendUrl}/storage/upload:slug*`, + destination: `${env.BACKENDSERVER_URL}/storage/upload:slug*`, has: [ { key: "access_token", type: "cookie" }, {