Files
huntingclubroster/main.php
T
2026-10-18 19:27:17 -04:00

30 lines
994 B
PHP

<?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();
$application->do();