30 lines
924 B
PHP
30 lines
924 B
PHP
<?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>
|