<?php
declare(strict_types=1);

// 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', $fullDomain);
}

if (!defined('APP_PREFIX')) {
    define('APP_PREFIX', 'miniapp');
}
