<?php
if (!defined('SECURE_ACCESS')) {
    header("HTTP/1.1 403 Forbidden");
    exit("Direct access not allowed.");
}
// Production Error Handling
error_reporting(0);
ini_set('display_errors', '0');

// Global Security Headers
header("X-Content-Type-Options: nosniff");
header("X-Frame-Options: SAMEORIGIN");
header("X-XSS-Protection: 1; mode=block");
header("Referrer-Policy: strict-origin-when-cross-origin");

// Database configuration
define('DB_HOST', 'localhost');
define('DB_PORT', '5432');
define('DB_NAME', 'yt_db');
define('DB_USER', 'postgres');
define('DB_PASS', 'postgres');

// Cloud storage email account defaults
define('GDRIVE_DEFAULT_EMAIL', 'info@reneneteducare.com');
define('ONEDRIVE_DEFAULT_EMAIL', 'renenet.educare@outlook.com');

// Session configuration
if (session_status() === PHP_SESSION_NONE) {
    session_set_cookie_params([
        'lifetime' => 0,
        'path' => '/',
        'domain' => '',
        'secure' => isset($_SERVER['HTTPS']),
        'httponly' => true,
        'samesite' => 'Lax'
    ]);
    session_start();
}
