everything(everything): simply saving work

This commit is contained in:
David Bailey 2024-08-15 22:53:55 +02:00
parent 0f2761cd61
commit 76ca7b9c32
25 changed files with 1330 additions and 561 deletions

View 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;
?>