wpmirror-conf/gh.admincdn.com.conf
feibisi 67b95a241a 同步生产 rewrite 规则:18 个配置文件与 admincdn-prod 一致
- 更新: api/cdnjs/googleajax/googlefonts/gstatic/wpstatic 规则与生产同步
- 新增: downloads/ps/s/ts/web.wenpai.net + gh/jsd.admincdn.com + translate/wpmirror.com + wpphoto + litepress.cn
- 删除: 旧命名文件(wordpress-*.conf/gravatar.conf/proxy.conf),统一用生产域名命名
- README: 完整文件清单、域名映射表、使用说明
2026-02-28 15:26:27 +08:00

57 lines
1.6 KiB
Text

client_max_body_size 100G;
underscores_in_headers on;
add_header Permissions-Policy interest-cohort=();
# SSL
location ~ \.well-known {
allow all;
}
# Fuck Search Engine
location /robots.txt {
allow all;
}
location / {
proxy_hide_header referrer-policy;
proxy_hide_header content-security-policy;
proxy_hide_header Strict-Transport-Security;
proxy_hide_header x-pjax-url;
proxy_set_header Host github.com;
proxy_set_header Accept-Encoding "";
proxy_set_header Referer https://github.com/;
proxy_set_header Origin https://github.com;
#proxy_set_header Connection "";
add_header x-pjax-url "https://gh.admincdn.com$request_uri";
proxy_http_version 1.1;
proxy_buffering off;
proxy_request_buffering off;
proxy_connect_timeout 864000s;
proxy_read_timeout 864000s;
proxy_send_timeout 864000s;
send_timeout 864000s;
proxy_max_temp_file_size 0;
# Not supported when installed from Debian source
proxy_socket_keepalive on;
proxy_ssl_server_name on;
sub_filter "\"https://github.com" "\"https://gh.admincdn.com";
sub_filter_once off;
proxy_cookie_domain github.com gh.admincdn.com;
proxy_redirect https://github.com https://gh.admincdn.com;
proxy_pass https://github.com;
}
# Block search engine
if ($http_user_agent ~* "qihoobot|Baiduspider|Bingbot|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot")
{
return 403;
}