Skip to content

Commit e15a6ce

Browse files
committed
Re-order mp3 rules
1 parent 54e9a76 commit e15a6ce

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

nginx.conf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ http {
5959
# add header to understand caching behavior
6060
add_header X-Relisten-Audio-Cache $upstream_cache_status;
6161

62+
# MP3 files - proxy if not found locally
63+
location ~ ^/(archive.org|phish.in|www.panicstream.com)/.*\.mp3$ {
64+
set $original_uri '$uri';
65+
expires max;
66+
add_header Cache-Control "public, max-age=31536000, immutable";
67+
try_files $uri @proxy_mp3;
68+
}
69+
6270
location ~* \.mp3$ {
6371
include cors.conf;
6472

@@ -74,14 +82,6 @@ http {
7482
default_type application/json;
7583
}
7684

77-
# MP3 files - proxy if not found locally
78-
location ~ ^/(archive.org|phish.in|www.panicstream.com)/.*\.mp3$ {
79-
set $original_uri '$uri';
80-
expires max;
81-
add_header Cache-Control "public, max-age=31536000, immutable";
82-
try_files $uri @proxy_mp3;
83-
}
84-
8585
# Non-MP3 files - redirect to real URL
8686
location ~ ^/(archive.org|phish.in|www.panicstream.com)/ {
8787
return 302 $redirect_url;

0 commit comments

Comments
 (0)