From 45cfc6e1b7dabfb0b49fa072bea1f68541ddae66 Mon Sep 17 00:00:00 2001 From: Ruben Date: Thu, 2 Oct 2025 23:36:06 +0200 Subject: [PATCH] Add support for serving custom assets from /custom/assets/ --- app/router.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/router.php b/app/router.php index a4adca3..73220a6 100644 --- a/app/router.php +++ b/app/router.php @@ -351,6 +351,14 @@ function renderFile(string $filePath): void { exit; } +// Check for assets in /custom/assets/ served at root level +$assetPath = dirname(__DIR__) . '/custom/assets/' . $requestPath; +if (file_exists($assetPath) && is_file($assetPath)) { + header('Content-Type: ' . (mime_content_type($assetPath) ?: 'application/octet-stream')); + readfile($assetPath); + exit; +} + // Handle frontpage if (empty($requestPath)) { // Try language-specific frontpage first, then default