Files
breadcrumb-the-shire/pages/branding/logo(none).phtml

23 lines
635 B
PHTML
Raw Normal View History

2026-02-04 23:31:53 +01:00
<?php
2026-02-23 12:58:19 +01:00
use MintyPHP\Service\Branding\BrandingServicesFactory;
2026-02-11 19:28:12 +01:00
define('MINTY_ALLOW_OUTPUT', true);
2026-02-04 23:31:53 +01:00
$size = isset($_GET['size']) ? (int) $_GET['size'] : null;
2026-03-04 15:56:58 +01:00
$logoService = app(\MintyPHP\Service\Branding\BrandingLogoService::class);
2026-02-23 12:58:19 +01:00
$path = $logoService->findLogoPath($size);
2026-02-04 23:31:53 +01:00
if (!$path || !is_file($path)) {
http_response_code(404);
return;
}
2026-02-23 12:58:19 +01:00
$mime = $logoService->detectMime($path);
2026-02-04 23:31:53 +01:00
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;