Skip to content

Instantly share code, notes, and snippets.

@Tsuk1ko
Last active July 12, 2024 11:49
Show Gist options
  • Save Tsuk1ko/da60a38a2258094eaf6efcbf55dc5bcf to your computer and use it in GitHub Desktop.
Save Tsuk1ko/da60a38a2258094eaf6efcbf55dc5bcf to your computer and use it in GitHub Desktop.
polyfill.io 重定向规则

由于 polyfill.io 事件,BootCDN、Bootcss、Staticfile 已经不安全,并且被 uBlock 屏蔽,影响部分网站访问

下载 Header Editor 插件,导入本重定向规则(重定向到 Zstatic CDN

https://gist.githubusercontent.com/Tsuk1ko/da60a38a2258094eaf6efcbf55dc5bcf/raw/polyfill.io_rules.json

image

之后便可增加 uBlock 自定义规则放行

@@||cdn.bootcdn.net^
@@||cdn.bootcss.com^
@@||cdn.staticfile.net^
@@||cdn.staticfile.org^
{
"request": [
{
"enable": true,
"name": "polyfill.io",
"ruleType": "redirect",
"matchType": "regexp",
"pattern": "^https://cdn\\.(?:bootcdn\\.net/ajax/libs|bootcss\\.com|staticfile\\.(?:net|org))/",
"exclude": "",
"group": "未分组",
"isFunction": false,
"action": "redirect",
"to": "https://s4.zstatic.net/ajax/libs/"
}
],
"sendHeader": [],
"receiveHeader": [],
"receiveBody": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment