Prepare LaySite 1.4.5 site icons, Head settings and release images

This commit is contained in:
2026-11-27 21:21:41 +08:00
parent 1609e7fc39
commit 00e8a70e06
34 changed files with 686 additions and 36 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ namespace App\Middleware;
use App\Content\Licenses;
use App\Content\Repository;
use App\Content\SiteIcon;
use App\Content\SystemPage;
use App\Controller\SiteController;
use Webman\Http\Request;
@@ -29,7 +30,8 @@ final class SiteStatus implements MiddlewareInterface
if (!empty($site['maintenance_enabled']) && ($page = SystemPage::published($repo, 'maintenance', $pages['maintenance'] ?? null))) {
// Media and styles must remain available for the maintenance page and the admin canvas.
if (in_array($request->method(), ['GET', 'HEAD'], true)
&& preg_match('~^/(?:assets/uploads/[a-f0-9]{32}\.[a-z0-9]+|palette/[0-9]+\.css|canvas-style\.css|favicon\.ico)$~D', $path)) {
&& ($path === SiteIcon::PATH
|| preg_match('~^/(?:assets/uploads/[a-f0-9]{32}\.[a-z0-9]+|palette/[0-9]+\.css|canvas-style\.css|favicon\.ico)$~D', $path))) {
$asset = $handler($request);
if ($asset->getStatusCode() !== 404) {
return $asset;