diff --git a/nginx.conf.sample b/nginx.conf.sample index 85e2fb66dec94..be5cff37e8e61 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -164,7 +164,7 @@ location /media/ { # image_filter_jpeg_quality 90; # } - try_files $uri $uri/ /get.php$is_args$args; + # try_files $uri $uri/ /get.php$is_args$args; location ~ ^/media/theme_customization/.*\.xml { deny all; @@ -180,7 +180,7 @@ location /media/ { add_header Cache-Control "no-store"; add_header X-Frame-Options "SAMEORIGIN"; expires off; - try_files $uri $uri/ /get.php$is_args$args; + # try_files $uri $uri/ /get.php$is_args$args; } add_header X-Frame-Options "SAMEORIGIN"; } diff --git a/pub/media/.htaccess b/pub/media/.htaccess index 1e536b9b4b61a..f58e492bb67a5 100644 --- a/pub/media/.htaccess +++ b/pub/media/.htaccess @@ -33,7 +33,7 @@ SetHandler default-handler ############################################ ## rewrite everything else to get.php - RewriteRule .* ../get.php [L] + RewriteRule .*.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2)$ ../get.php [L] ############################################