refactor+docs: serverURL dynamisch, NEXT_PUBLIC_SERVER_URL entfernt (v1.1.76)
- config.js verwendet nun window.location und API_PORT_MODE zur URL-Ermittlung - feste Konfiguration aus .env.local entfällt (bereinigt) - neue Dokumentation: docs/frontend/config/config.md - CHANGELOG.md aktualisiert (v1.1.76)
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
// /config/appVersion
|
||||
export const APP_VERSION = "1.1.76";
|
||||
export const APP_VERSION = "1.1.77";
|
||||
|
||||
@@ -7,7 +7,10 @@ const standardSideMenu = true;
|
||||
const fullSideMenu = false;
|
||||
|
||||
// Server-URL aus Umgebungsvariable holen (nur bei echter API benötigt)
|
||||
const serverURL = process.env.NEXT_PUBLIC_SERVER_URL || "";
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const serverURL = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80` : `${window.location.origin}`;
|
||||
|
||||
if (!serverURL && !isMockMode()) {
|
||||
throw new Error("Die Umgebungsvariable NEXT_PUBLIC_SERVER_URL ist nicht gesetzt!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user