Skip to content

Commit ef41e8c

Browse files
authored
Added nginx headers that allow caching for audio/images (UltiMafia#2592)
1 parent 351adb3 commit ef41e8c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

react_main/nginx.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,16 @@ server {
235235
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
236236
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
237237
}
238+
239+
location ~* \.(jpg|jpeg|png|gif|ico|svg)$ {
240+
expires 30d;
241+
add_header Cache-Control "public, no-transform";
242+
}
243+
244+
location ~* \.(mp3|aac|ogg|wav|flac)$ {
245+
expires 30d;
246+
add_header Cache-Control "public, no-transform";
247+
}
238248

239249
listen 443 ssl; # managed by Certbot
240250
http2 on;

0 commit comments

Comments
 (0)