1
0
Files
breadcrumb-the-shire/pages/branding/logo(none).phtml
2026-03-04 15:56:58 +01:00

23 lines
635 B
PHTML

<?php
use MintyPHP\Service\Branding\BrandingServicesFactory;
define('MINTY_ALLOW_OUTPUT', true);
$size = isset($_GET['size']) ? (int) $_GET['size'] : null;
$logoService = app(\MintyPHP\Service\Branding\BrandingLogoService::class);
$path = $logoService->findLogoPath($size);
if (!$path || !is_file($path)) {
http_response_code(404);
return;
}
$mime = $logoService->detectMime($path);
header('Content-Type: ' . $mime);
header('X-Content-Type-Options: nosniff');
header("Content-Security-Policy: sandbox");
header('Cache-Control: public, max-age=86400');
header('Content-Length: ' . filesize($path));
readfile($path);
return;