This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/domaindata.php';
|
||||
|
||||
$host = $_SERVER['HTTP_HOST'] ?? '';
|
||||
$isCli = PHP_SAPI === 'cli';
|
||||
$isStagingHost = is_string($host) && str_starts_with($host, 'staging.');
|
||||
@@ -10,4 +8,3 @@ $isStagingHost = is_string($host) && str_starts_with($host, 'staging.');
|
||||
$envDir = $isStagingHost ? __DIR__ . '/staging' : __DIR__ . '/prod';
|
||||
|
||||
require_once $envDir . '/config.php';
|
||||
|
||||
|
||||
11
config/domainbase.php
Normal file
11
config/domainbase.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
if (!defined('APP_PREFIX')) {
|
||||
define('APP_PREFIX', 'c0de');
|
||||
}
|
||||
|
||||
if (!defined('APP_DOMAIN_BASE')) {
|
||||
define('APP_DOMAIN_BASE', 'c0de.it');
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
define('APP_DOMAIN_NAME', 'c0de.it');
|
||||
define('APP_PREFIX', 'c0de');
|
||||
@@ -3,7 +3,7 @@ ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once dirname(__DIR__) . "/domaindata.php";
|
||||
require_once __DIR__ . "/domaindata.php";
|
||||
|
||||
// Umgebung (optional, aber hilfreich für Debugging / Logik)
|
||||
define('APP_ENV', 'prod'); // oder 'prod', 'local', ...
|
||||
@@ -29,5 +29,5 @@ define('MATOMO_URL', 'https://matomo.my-statistics.info/');
|
||||
define('MATOMO_ENABLED', true);
|
||||
define('MATOMO_SITE_ID', 7);
|
||||
$env = 'prod';
|
||||
$baseUrl = 'https://'.APP_DOMAIN_NAME;
|
||||
$apiBaseUrl = 'https://api.'.APP_DOMAIN_NAME;
|
||||
$baseUrl = 'https://' . APP_DOMAIN_PRIMARY;
|
||||
$apiBaseUrl = 'https://api.' . APP_DOMAIN_PRIMARY;
|
||||
|
||||
9
config/prod/domaindata.php
Normal file
9
config/prod/domaindata.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once dirname(__DIR__) . '/domainbase.php';
|
||||
|
||||
if (!defined('APP_DOMAIN_NAME')) {
|
||||
define('APP_DOMAIN_NAME', APP_DOMAIN_BASE);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once dirname(__DIR__) . "/domaindata.php";
|
||||
require_once __DIR__ . "/domaindata.php";
|
||||
|
||||
// Umgebung (optional, aber hilfreich für Debugging / Logik)
|
||||
define('APP_ENV', 'staging'); // oder 'prod', 'local', ...
|
||||
@@ -15,13 +15,13 @@ if (!defined('ASSET_VERSION')) {
|
||||
|
||||
// Domain-Konfiguration (kann pro Umgebung angepasst werden)
|
||||
if (!defined('APP_DOMAIN_PRIMARY')) {
|
||||
define('APP_DOMAIN_PRIMARY', 'staging.'.APP_DOMAIN_NAME);
|
||||
define('APP_DOMAIN_PRIMARY', APP_STAGE_PREFIX . '.' . APP_DOMAIN_NAME);
|
||||
}
|
||||
if (!defined('APP_URL_PRIMARY')) {
|
||||
define('APP_URL_PRIMARY', 'https://' . APP_DOMAIN_PRIMARY);
|
||||
}
|
||||
if (!defined('APP_DOMAIN_FAKECHECK')) {
|
||||
define('APP_DOMAIN_FAKECHECK', 'staging.ismyusbfake.com');
|
||||
define('APP_DOMAIN_FAKECHECK', APP_STAGE_PREFIX . '.ismyusbfake.com');
|
||||
}
|
||||
if (!defined('APP_URL_FAKECHECK')) {
|
||||
define('APP_URL_FAKECHECK', 'https://' . APP_DOMAIN_FAKECHECK);
|
||||
|
||||
13
config/staging/domaindata.php
Normal file
13
config/staging/domaindata.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once dirname(__DIR__) . '/domainbase.php';
|
||||
|
||||
if (!defined('APP_DOMAIN_NAME')) {
|
||||
define('APP_DOMAIN_NAME', APP_DOMAIN_BASE);
|
||||
}
|
||||
|
||||
if (!defined('APP_STAGE_PREFIX')) {
|
||||
define('APP_STAGE_PREFIX', 'staging');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user