From cec4fb7ede7fee7b5621c096f3d5a4863b7b484e Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 20 Oct 2024 16:49:11 -0400 Subject: refactor config and add allowed_hosts --- src/web/index.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/web/index.php') diff --git a/src/web/index.php b/src/web/index.php index 6b4bf06..c0ed0ef 100644 --- a/src/web/index.php +++ b/src/web/index.php @@ -6,16 +6,6 @@ ini_set('html_errors', '1'); ini_set('browscap', 'browscap.ini'); date_default_timezone_set('America/New_York'); -// ENVIRONMENT -// -// devlopment - do not cache any assets -// - use http host provided by user -// -// production - use generated timestamps for each file -// - hard code http host to 'domain' lang string -// -define('ENVIRONMENT', 'devlopment'); - // FOLDER_ROOT // // define folder directiroy paths based on this file @@ -26,14 +16,13 @@ define('PUBLIC_ROOT', PHP_ROOT . '/public'); // ========================== BOOTSTRAP == +// load the config +require(WEB_ROOT . '/config.php'); + // load all third party require(WEB_ROOT . '/third_party/parsedown.php'); require(WEB_ROOT . '/third_party/parsedown_extra.php'); -// load all the config files -require(WEB_ROOT . '/config/routes.php'); -require(WEB_ROOT . '/config/style.php'); - // load all the helpers require(WEB_ROOT . '/helpers/ie.php'); require(WEB_ROOT . '/helpers/lang.php'); @@ -50,6 +39,7 @@ require(WEB_ROOT . '/core/controller.php'); require(WEB_ROOT . '/core/model.php'); require(WEB_ROOT . '/core/router.php'); + // load file stamps require(WEB_ROOT . '/stamp.php'); -- cgit v1.2.3-freya