Prepare LaySite 1.4.5 site icons, Head settings and release images
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user