generated from jric11/baseProject
Codex's updates...
This commit is contained in:
@@ -1,8 +1,29 @@
|
||||
<?php
|
||||
|
||||
require_once "classes/Base.php";
|
||||
|
||||
declare(strict_types=1);
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
header('Referrer-Policy: no-referrer');
|
||||
header('X-Frame-Options: DENY');
|
||||
header('Cache-Control: no-store');
|
||||
set_exception_handler(function (Throwable $e): void {
|
||||
error_log((string) $e);
|
||||
http_response_code(500);
|
||||
echo 'The application could not complete this request. Please try again later.';
|
||||
});
|
||||
require_once __DIR__ . '/classes/Base.php';
|
||||
$application = new Base();
|
||||
$https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
|
||||
if ((string) $application->getSettings()->Environment === 'Production' && !$https) {
|
||||
http_response_code(400);
|
||||
exit('HTTPS is required. Open the secure application URL.');
|
||||
}
|
||||
ini_set('session.use_strict_mode', '1');
|
||||
ini_set('session.use_only_cookies', '1');
|
||||
session_name('HUNTINGCLUBROSTER');
|
||||
session_set_cookie_params([
|
||||
'lifetime' => 0, 'path' => '/',
|
||||
'secure' => $https,
|
||||
'httponly' => true, 'samesite' => 'Lax',
|
||||
]);
|
||||
session_start();
|
||||
|
||||
(new Base())->do();
|
||||
?>
|
||||
$application->do();
|
||||
|
||||
Reference in New Issue
Block a user