Skip to content

Commit 13b6d9a

Browse files
committed
Update
1 parent e1557c6 commit 13b6d9a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

_hosts/media.codonaft/etc/nginx/http.d/userscripts.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,26 @@ server {
3131
set $target https://raw.githubusercontent.com/codonaft/userscripts/refs/heads/main;
3232

3333
location = / {
34+
add_header Cache-Control "public, max-age=7200";
35+
expires 2h;
3436
return 301 https://github.com/codonaft/userscripts;
3537
}
3638

3739
location ~ ^/(.*?)(?<!\.user)\.js$ {
40+
add_header Cache-Control "public, max-age=7200";
41+
expires 2h;
3842
return 301 $target/$1.user.js;
3943
}
4044

41-
location ~ ^/([^/.]+)$ {
45+
location ~ ^/([^/.]+)/?$ {
46+
add_header Cache-Control "public, max-age=7200";
47+
expires 2h;
4248
return 301 $target/$1.user.js;
4349
}
4450

4551
location / {
4652
add_header Cache-Control "public, max-age=7200";
4753
expires 2h;
48-
default_type "text/plain";
4954
return 301 $target$request_uri;
5055
}
5156
}

0 commit comments

Comments
 (0)