Add support for serving custom assets from /custom/assets/
This commit is contained in:
parent
60ba4b5545
commit
45cfc6e1b7
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue