From 3e2d4544839ac4e9571e21a3b2f2ecf8d4784a10 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 6 Jun 2024 06:37:29 -0400 Subject: [PATCH] Add Drupal 10+ CSS/JS Aggregation support (#337) --- drupal/rootfs/etc/nginx/shared/drupal.defaults.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drupal/rootfs/etc/nginx/shared/drupal.defaults.conf b/drupal/rootfs/etc/nginx/shared/drupal.defaults.conf index 07329aaf..f960f4b7 100644 --- a/drupal/rootfs/etc/nginx/shared/drupal.defaults.conf +++ b/drupal/rootfs/etc/nginx/shared/drupal.defaults.conf @@ -85,6 +85,11 @@ location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7 try_files $uri /index.php?$query_string; } +# handle CSS/JS aggregation through Drupal +location ~ ^/sites/.*/files/(css|js)/ { + try_files $uri /index.php?$query_string; +} + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { try_files $uri @rewrite; expires max;