up
This commit is contained in:
29
partials/structure/app_config.php
Normal file
29
partials/structure/app_config.php
Normal 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>
|
||||
Reference in New Issue
Block a user