Launch LaySite visual editor and MCP workspace

This commit is contained in:
2026-11-22 23:26:08 +08:00
commit 1bb0554608
159 changed files with 11103 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace App\Middleware;
use Webman\Http\Request;
use Webman\Http\Response;
use Webman\MiddlewareInterface;
final class PublicAssets implements MiddlewareInterface
{
public function process(Request $request, callable $handler): Response
{
$response = $handler($request);
$path = $request->path();
if (str_starts_with($path, '/assets/')) {
$response->withHeader('Access-Control-Allow-Origin', '*');
if ($path === '/assets/jquery-4.0.0.min.js') {
$response->withHeader('Cache-Control', 'public, max-age=31536000, immutable');
}
}
return $response;
}
}