Deployment-Vorbereitung: Domain-Split und Legacy-/Debug-Seiten entfernt
- index.php zeigt bei abweichendem Host (APP_HOST-Env) die Landingpage statt des Dashboards, damit kaffeeliste.de und app.kaffeeliste.de aus demselben Webspace bedient werden koennen. Ohne gesetztes APP_HOST (lokale Entwicklung) unveraendertes Verhalten. - landing.php verlinkt Login/Registrierung ueber APP_HOST fest auf die App-Domain, damit Besucher der Marketingdomain dort landen. - functionsLDAP.php entfernt (nur ueber die tote IIS/AUTH_USER-Branch erreichbar, vollstaendig durch app/saas-auth.php ersetzt); zugehoerige tote AD/LDAP-Variablen aus config.php und der AUTH_USER-Zweig aus functions.php entfernt. - mailausgebe.php, umfrage.php, umfrageergebnisse.php entfernt: aus der Navigation nicht erreichbare Debug-/Einzweck-Seiten ohne echte Berechtigungspruefung (mailausgebe.php dumpte alle Mitglieder-E-Mails, umfrageergebnisse.php hatte nur einen auskommentierten Basic-Auth- Block). scripts/http-smoke.php entsprechend bereinigt.
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . "/app/bootstrap.php";
|
||||
|
||||
// Marketingdomain (z. B. kaffeeliste.de) zeigt die Landingpage statt des
|
||||
// Dashboards; nur der Host aus APP_HOST bekommt die eigentliche App. Ohne
|
||||
// gesetztes APP_HOST (lokale Entwicklung) verhaelt sich index.php wie
|
||||
// bisher immer als Dashboard.
|
||||
$appHost = app_primary_host();
|
||||
$requestHost = strtolower(preg_replace('/:\d+$/', '', (string)($_SERVER['HTTP_HOST'] ?? '')));
|
||||
if ($appHost !== null && $requestHost !== strtolower($appHost)) {
|
||||
require __DIR__ . '/landing.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
include "functions.php";
|
||||
require_once __DIR__ . "/app/ledger.php";
|
||||
app_require_csrf();
|
||||
|
||||
Reference in New Issue
Block a user