This commit is contained in:
2025-12-30 02:11:55 +01:00
parent ee8a03238c
commit 54ee2b3b73
3 changed files with 39 additions and 6 deletions

View File

@@ -1,10 +1,21 @@
<?php
declare(strict_types=1);
// Example: a single "brand" domain name.
// In real deployments you might derive this from ENV or hostnames.
// Domain steering by TLD (.de/.at/.ch/.info)
$host = $_SERVER['HTTP_HOST'] ?? '';
$allowedTlds = ['de','at','ch','info'];
$tld = 'info';
if (preg_match('/\\.(de|at|ch|info)$/i', $host, $m)) {
$tld = strtolower($m[1]);
}
if (!in_array($tld, $allowedTlds, true)) {
$tld = 'info';
}
$baseDomain = 'papa-kind-treff.' . $tld;
$fullDomain = 'staging.' . $baseDomain;
if (!defined('APP_DOMAIN_NAME')) {
define('APP_DOMAIN_NAME', 'staging.papa-kind-treff.info');
define('APP_DOMAIN_NAME', $fullDomain);
}
if (!defined('APP_PREFIX')) {