Fix: BASE_URL folgt dem echten Host (Glossar-Fetch auf v3) + Weltkueche „Nachbarland"-Wortlaut

- app.php: BASE_URL fuer *.geograsim.at war hart 'https://geograsim.at' -> auf
  v3.geograsim.at lud die Glossar-API cross-origin -> CORS/NetworkError
  ("Glossar konnte nicht geladen werden"). Jetzt BASE_URL='https://'.$host
  (same-origin auf jeder Umgebung; prod-neutral, geograsim.at bleibt gleich).
- weltkueche/game.html: Zweit-Lieferant hiess pauschal „Nachbarland" — Frankreich
  ist aber kein Nachbar Oesterreichs. Jetzt „europaeisches Land in unserer Naehe".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-20 16:30:59 +02:00
parent 5b0505b140
commit 5d3cd1bdcf
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -28,7 +28,12 @@ define('IS_PRODUCTION', $host !== 'localhost' || ($envProdExists && !file_exists
// localhost/geograsim/App/ → /geograsim/App
if (strpos($host, 'geograsim.at') !== false) {
define('BASE_PATH', '');
define('BASE_URL', 'https://geograsim.at');
// BASE_URL folgt dem TATSÄCHLICHEN Host (geograsim.at, v3.geograsim.at, …),
// damit same-origin-Fetches (z.B. Glossar-API) auf jeder Umgebung greifen.
// Vorher war 'https://geograsim.at' hartcodiert → auf v3.geograsim.at wurde
// die API cross-origin geladen → CORS/NetworkError. Alle *.geograsim.at
// werden per TLS ausgeliefert, daher https.
define('BASE_URL', 'https://' . $host);
} elseif (strpos($host, 'staatsgeheimnis.at') !== false) {
define('BASE_PATH', '/geograsim');
define('BASE_URL', 'https://www.staatsgeheimnis.at/geograsim');