Update: 2026-05-03 20:51:50
This commit is contained in:
@@ -5,12 +5,27 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
// 1. Constants
|
||||
// 1. Error Reporting (Secure for production)
|
||||
if (env('APP_DEBUG', 'false') === 'true') {
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', '1');
|
||||
} else {
|
||||
error_reporting(0);
|
||||
ini_set('display_errors', '0');
|
||||
}
|
||||
|
||||
// 2. Security Headers
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
header("X-Frame-Options: DENY");
|
||||
header("X-XSS-Protection: 1; mode=block");
|
||||
header("Referrer-Policy: strict-origin-when-cross-origin");
|
||||
|
||||
// 3. Constants
|
||||
define('ROOT_PATH', dirname(__DIR__, 2));
|
||||
define('APP_PATH', ROOT_PATH . '/app');
|
||||
define('STORAGE_PATH', ROOT_PATH . '/storage');
|
||||
|
||||
// 2. Load Environment Variables
|
||||
// 3. Environment Loader
|
||||
require_once APP_PATH . '/bootstrap/env.php';
|
||||
|
||||
// 3. Common Helpers
|
||||
|
||||
Reference in New Issue
Block a user