everything(everything): simply saving work
This commit is contained in:
parent
0f2761cd61
commit
76ca7b9c32
25 changed files with 1330 additions and 561 deletions
19
www/src/setup_site_config.php
Normal file
19
www/src/setup_site_config.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
$SERVER_HOST = $_SERVER['HTTP_HOST'];
|
||||
if(!preg_match('/^[\w\.\:]+$/', $SERVER_HOST)) {
|
||||
http_response_code(500);
|
||||
|
||||
echo "Not a valid server host (was " . $SERVER_HOST . ")";
|
||||
die();
|
||||
}
|
||||
|
||||
$SERVER_PREFIX = "https://" . $SERVER_HOST;
|
||||
|
||||
$SITE_CONFIG = Yaml::parseFile('../secrets/' . $SERVER_HOST . '.config.yml');
|
||||
$SITE_CONFIG['uri_prefix'] = $SERVER_PREFIX;
|
||||
$SITE_CONFIG['HTTP_HOST'] = $SERVER_HOST;
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue