Address system information and license review suggestions

This commit is contained in:
2026-11-25 22:16:38 +08:00
parent 080f146fef
commit df3722ae36
11 changed files with 78 additions and 39 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Middleware;
use App\Content\Assets;
use Webman\Http\Request;
use Webman\Http\Response;
use Webman\MiddlewareInterface;
@@ -16,7 +17,7 @@ final class PublicAssets implements MiddlewareInterface
$path = $request->path();
if (str_starts_with($path, '/assets/')) {
$response->withHeader('Access-Control-Allow-Origin', '*');
if ($path === '/assets/jquery-4.0.0.min.js') {
if ($path === Assets::JQUERY) {
$response->withHeader('Cache-Control', 'public, max-age=31536000, immutable');
}
}