Admin Authentication
Dashboard & Analytics
0
Total Projects
0
Total Posts
0
Total Visits / Downloads
Recent Downloads (Consent-Gated Telemetry)
| Date & Project | Network & Location | Hardware & Screen | OS, Env & Source |
|---|
Add New Project
Create Announcement Post
Manage Categories
Appearance Settings
Server-Side Hardening (`api.php`)
Add these snippets at the top of your api.php to complete server-side protection for CSRF, Security Headers, and DSGVO IP anonymization:
// 1. Security Headers (Point 6)
header("X-Content-Type-Options: nosniff");
header("X-Frame-Options: DENY");
header("Referrer-Policy: strict-origin-when-cross-origin");
header("Permissions-Policy: geolocation=(), microphone=(), camera=()");
header("Strict-Transport-Security: max-age=31536000; includeSubDomains");
// 2. CSRF Token Generation & Verification (Point 4)
session_start();
if (empty($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
// Return 'csrf_token' => $_SESSION['csrf_token'] in your check_auth JSON!
// 3. DSGVO IP Anonymization (Point 1)
function anonymizeIp($ip) {
return preg_replace('/\.\d+$/', '.0', $ip);
}