refactor: basePath als Umgebungsvariable eingeführt (NEXT_PUBLIC_BASE_PATH)
- alle festen "/talas5/" Pfade entfernt - dynamischer basePath für API-Links und Station öffnen - README.md und CHANGELOG.md aktualisiert - Version erhöht auf 1.1.188
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
// /config/appVersion
|
||||
export const APP_VERSION = "1.1.188";
|
||||
export const APP_VERSION = "1.1.189";
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
// Dynamische Bestimmung der URLs basierend auf window.location.origin ohne Port
|
||||
let BASE_URL, SERVER_URL, PROXY_TARGET, OFFLINE_TILE_LAYER, MAP_TILES_LAYER;
|
||||
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
// Client-seitige Logik
|
||||
@@ -12,7 +13,7 @@ if (typeof window !== "undefined") {
|
||||
SERVER_URL = originWithoutPort; // Dynamisch ermittelt, ohne Port
|
||||
PROXY_TARGET = `${originWithoutPort}:4000`; // Dynamisch für einen Proxy
|
||||
|
||||
OFFLINE_TILE_LAYER = `${originWithoutPort}/talas5/TileMap/mapTiles/{z}/{x}/{y}.png`; //Map von Talas_v5 Server
|
||||
OFFLINE_TILE_LAYER = `${originWithoutPort}${basePath}/TileMap/mapTiles/{z}/{x}/{y}.png`; //Map von Talas_v5 Server
|
||||
//console.log("OFFLINE_TILE_LAYER: ", OFFLINE_TILE_LAYER);
|
||||
|
||||
MAP_TILES_LAYER = OFFLINE_TILE_LAYER; // Standardwert
|
||||
|
||||
Reference in New Issue
Block a user