Fix unauthenticated direct PDF certificate serving

This commit is contained in:
Jeppe B
2026-06-01 23:08:53 +02:00
parent 4945abfd8e
commit 2a1a730a8c
-5
View File
@@ -177,11 +177,6 @@ if (php_sapi_name() === 'cli' || isset($_GET['internalCronCall'])) {
exit;
}
// If the route ends with .php, then require the file_server.php
if (str_contains($_SERVER['REQUEST_URI'], '.pdf')) {
require_once 'file_server.php';
exit;
}
// If the route ends with a MIME type, then require the file_server.php
if ((preg_match('/\.(jpg|jpeg|png)$/', $_SERVER['REQUEST_URI']) || str_contains($_SERVER['REQUEST_URI'], '/files/'))) {
require_once 'file_server.php';