From b61a32c8a9b10e129666804d533487430ce7432c Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Wed, 3 Jan 2024 14:57:44 +0000 Subject: [PATCH] fix(media): add missing HEAD route for static assets served with S3 --- modules/Media/Config/Routes.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/Media/Config/Routes.php b/modules/Media/Config/Routes.php index c8d4703a..a9984bfb 100644 --- a/modules/Media/Config/Routes.php +++ b/modules/Media/Config/Routes.php @@ -12,6 +12,11 @@ use CodeIgniter\Router\RouteCollection; /** @var RouteCollection $routes */ +$routes->head('static/(:any)', 'MediaController::serve/$1', [ + 'as' => 'media-serve', + 'namespace' => 'Modules\Media\Controllers', + 'filter' => 'allow-cors', +]); $routes->get('static/(:any)', 'MediaController::serve/$1', [ 'as' => 'media-serve', 'namespace' => 'Modules\Media\Controllers',