<?php
$secret = getenv('COOKIE_SECRET') ?: 'super_secret_cookie_value_change_me';

if (!isset($_COOKIE['flag_auth']) || $_COOKIE['flag_auth'] !== $secret) {
    http_response_code(403);
    die('This would be nice to see the flag, but you are not authorized to do so.');
}

echo getenv('FLAG') ?: 'FCSC{flag_placeholder}';
?>
