Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

替换不安全的 StaticFile CDN #1109

Closed
yzl3014 opened this issue Jul 6, 2024 · 4 comments
Closed

替换不安全的 StaticFile CDN #1109

yzl3014 opened this issue Jul 6, 2024 · 4 comments

Comments

@yzl3014
Copy link

yzl3014 commented Jul 6, 2024

V2EX: Polyfill.io 和 bootcdn 和 staticfile CDN 被 uBlockOrigin 屏蔽,因疑似被攻击者控制。

目前这两个CDN的网址已经被 uBlockOrigin 列入屏蔽清单: uBlockOrigin/uAssets#24285

涉及到的网址:

waline: https://cdn.staticfile.org/waline/2.15.5/

可以替换为 CDNJS: https://cdnjs.cloudflare.com/ajax/libs/waline/2.15.8/

另:使用 Waline 3.0.0 及以上版本,评论区无法显示。

@zhullyb
Copy link

zhullyb commented Jul 6, 2024

cloudflare 在中国大陆访问质量差是老生常谈的问题,不知道有没有什么没有被屏蔽的公共 cdn 可用,眼下可能只能考虑使用境外的 cdn 顶一顶了

@zhullyb
Copy link

zhullyb commented Jul 6, 2024

https://registry.npmmirror.com/@waline/client/^2/files/dist/waline.js
https://registry.npmmirror.com/@waline/client/^2/files/dist/waline.css

上述两个 url 可以被正常访问,且由 npmmirror 提供境内的 cdn 支持
唯一的缺点是没有提供 .min.js.min.css,如果使用 npmmirror 的话需要更改此处的源码

Fluid.utils.createCssLink('<%= url_join(theme.static_prefix.waline, 'waline.min.css') %>')
Fluid.utils.createScript('<%= url_join(theme.static_prefix.waline, 'waline.min.js') %>', function() {

@zhullyb
Copy link

zhullyb commented Jul 6, 2024

https://registry.npmmirror.com/@waline/client/^2/files/dist/waline.js https://registry.npmmirror.com/@waline/client/^2/files/dist/waline.css

上述两个 url 可以被正常访问,且由 npmmirror 提供境内的 cdn 支持 唯一的缺点是没有提供 .min.js.min.css,如果使用 npmmirror 的话需要更改此处的源码

Fluid.utils.createCssLink('<%= url_join(theme.static_prefix.waline, 'waline.min.css') %>')
Fluid.utils.createScript('<%= url_join(theme.static_prefix.waline, 'waline.min.js') %>', function() {

鉴于 waline 在 npmjs.com 发布的 dist 目录中确实没有自带 .min.js.min.css,我觉得删除源码中的 .min 字段也算合理?

zkqiang added a commit that referenced this issue Jul 18, 2024
@zkqiang
Copy link
Member

zkqiang commented Jul 18, 2024

https://registry.npmmirror.com/@waline/client/^2/files/dist/waline.js https://registry.npmmirror.com/@waline/client/^2/files/dist/waline.css
上述两个 url 可以被正常访问,且由 npmmirror 提供境内的 cdn 支持 唯一的缺点是没有提供 .min.js.min.css,如果使用 npmmirror 的话需要更改此处的源码

Fluid.utils.createCssLink('<%= url_join(theme.static_prefix.waline, 'waline.min.css') %>')
Fluid.utils.createScript('<%= url_join(theme.static_prefix.waline, 'waline.min.js') %>', function() {

鉴于 waline 在 npmjs.com 发布的 dist 目录中确实没有自带 .min.js.min.css,我觉得删除源码中的 .min 字段也算合理?

感谢,采纳了这个提议

@zkqiang zkqiang closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants