Skip to content

Commit 3e6865e

Browse files
committed
Update
1 parent 63406cb commit 3e6865e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,20 @@ server {
2828
ssl_certificate_key /etc/nginx/ssl/codonaft.com/privkey.pem;
2929
ssl_trusted_certificate /etc/nginx/ssl/codonaft.com/chain.pem;
3030

31+
set $target https://raw.githubusercontent.com/codonaft/userscripts/refs/heads/main;
32+
3133
location = / {
3234
return 301 https://github.com/codonaft/userscripts;
3335
}
3436

37+
location ~ ^/(.*?)(?<!\.user)\.js$ {
38+
return 301 $target/$1.user.js;
39+
}
40+
3541
location / {
3642
add_header Cache-Control "public, max-age=7200";
3743
expires 2h;
3844
default_type "text/plain";
39-
return 301 https://raw.githubusercontent.com/codonaft/userscripts/refs/heads/main$request_uri;
45+
return 301 $target$request_uri;
4046
}
4147
}

0 commit comments

Comments
 (0)