From 9d249292a89320a4eeb348ab2e07fc3e9e0298d1 Mon Sep 17 00:00:00 2001 From: Erik Geletti Date: Thu, 19 Oct 2023 12:04:13 +0200 Subject: [PATCH] Update Drupal 10 template Resolved a problem with loading CSS and JS files when "Aggregate CSS files" and "Aggregate JavaScript files" are enabled. --- v2-varnish/Drupal/Drupal 10 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/v2-varnish/Drupal/Drupal 10 b/v2-varnish/Drupal/Drupal 10 index 96c49ff..fac3d6d 100755 --- a/v2-varnish/Drupal/Drupal 10 +++ b/v2-varnish/Drupal/Drupal 10 @@ -38,7 +38,7 @@ server { } location @rewrite { - rewrite ^/(.*)$ /index.php?q=$1; + rewrite ^ /index.php; } location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7 @@ -80,6 +80,7 @@ server { location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|ico|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { add_header Access-Control-Allow-Origin "*"; + try_files $uri @rewrite; expires max; access_log off; } @@ -87,4 +88,4 @@ server { if (-f $request_filename) { break; } -} \ No newline at end of file +}