Address system information and license review suggestions
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user