File tree Expand file tree Collapse file tree
_hosts/media.codonaft/etc/nginx/http.d Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments