This commit is contained in:
2025-11-25 00:53:25 +01:00
parent 804b7da7f0
commit f0153dda4a
5 changed files with 284 additions and 206 deletions

View File

@@ -0,0 +1,29 @@
<?php
// partials/structure/app_config.php
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'] ?? app_primary_domain();
$requestUri = $_SERVER['REQUEST_URI'] ?? '/';
$usbConfig = [
'lang' => $lang ?? 'en',
'assetsBase'=> '/assets',
'env' => $GLOBALS['ENV'] ?? 'prod',
'domains' => [
'primaryDomain' => app_primary_domain(),
'primaryUrl' => app_primary_url(),
'fakecheckDomain' => app_fakecheck_domain(),
'fakecheckUrl' => app_fakecheck_url(),
],
'fakecheck' => [
'baseUrl' => $GLOBALS['usb_base_url'] ?? '',
'apiBaseUrl'=> $GLOBALS['usb_api_base'] ?? 'https://api.usbcheck.it',
'locale' => $lang ?? 'en',
],
];
?>
<script>
window.usbConfig = <?= json_encode($usbConfig, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?>;
</script>