From a545b84f6c13b075c58290970e3ab7d90109fd18 Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Fri, 6 Feb 2026 18:57:41 -0600 Subject: [PATCH] variable --- bizmatch/src/environments/environment.base.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/bizmatch/src/environments/environment.base.ts b/bizmatch/src/environments/environment.base.ts index beddc38..f0436fc 100644 --- a/bizmatch/src/environments/environment.base.ts +++ b/bizmatch/src/environments/environment.base.ts @@ -3,21 +3,18 @@ // Auf dem Server (SSR in Docker) nehmen wir 'bizmatch-app' (der Name des Backend-Containers). const isBrowser = typeof window !== 'undefined' && window.navigator.userAgent !== 'node'; const hostname = isBrowser ? window.location.hostname : 'bizmatch-app'; - +// Im Server-Modus nutzen wir den internen Docker-Namen +const internalUrl = 'http://bizmatch-app:3001'; +// Im Browser-Modus die öffentliche URL +const publicUrl = 'https://api.bizmatch.net'; +const calculatedApiBaseUrl = isBrowser ? publicUrl : internalUrl; // WICHTIG: Port anpassen! // Lokal läuft das Backend auf 3001. Im Docker Container auch auf 3001. // Deine alte Config hatte hier :4200 stehen, das war falsch (das ist das Frontend). export const environment_base = { // apiBaseUrl: 'http://localhost:3000', // GETTER FUNCTION für die API URL (besser als statischer String für diesen Fall) - get apiBaseUrl() { - if (isBrowser) { - return 'https://api.bizmatch.net'; - } else { - // SSR (Docker) nutzt interne Verbindung - return 'http://bizmatch-app:3001'; - } - }, + apiBaseUrl: calculatedApiBaseUrl, imageBaseUrl: 'https://dev.bizmatch.net', buildVersion: '', mailinfoUrl: 'https://dev.bizmatch.net',