Skip to content

Commit 0688cda

Browse files
Add caching headers for avif images
1 parent 1aa73ff commit 0688cda

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cookbook/web-server/apache.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Let's add the Apache configuration file for the `sulu.lo` domain.
6060
ExpiresByType image/svg "access plus 1 year"
6161
ExpiresByType image/jpeg "access plus 1 year"
6262
ExpiresByType image/jpg "access plus 1 year"
63+
ExpiresByType image/avif "access plus 1 year"
6364
ExpiresByType image/webp "access plus 1 year"
6465
ExpiresByType image/x-icon "access plus 1 year"
6566
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
@@ -74,7 +75,7 @@ Let's add the Apache configuration file for the `sulu.lo` domain.
7475
</IfModule>
7576
7677
<IfModule mod_headers.c>
77-
<filesMatch ".(ico|css|js|gif|webp|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$">
78+
<filesMatch ".(ico|css|js|gif|webp|avif|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$">
7879
Header set Cache-Control "public, max-age=31536000, immutable"
7980
</filesMatch>
8081

cookbook/web-server/nginx.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The Nginx configuration could look something like.
2626
}
2727
2828
# expire
29-
location ~* \.(?:ico|css|js|gif|webp|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$ {
29+
location ~* \.(?:ico|css|js|gif|webp|avif|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$ {
3030
# try to serve file directly, fallback to index.php
3131
try_files $uri /index.php$is_args$args;
3232
access_log off;

0 commit comments

Comments
 (0)