-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
feat-wordpress: add cdn for http images #6790
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/diy/rsshub/iie8iy7zt |
Successfully generated as following: https://rsshub-2r5wf15df.vercel.app/blogs/wordpress/wjd.name/http/1 - Success
|
lib/routes/blogs/wordpress.js
Outdated
@@ -2,6 +2,9 @@ const parser = require('@/utils/rss-parser'); | |||
|
|||
module.exports = async (ctx) => { | |||
const scheme = ctx.params.https || 'https'; | |||
const cdnList = ['https://imageproxy.pimg.tw/resize?url=', 'https://images.weserv.nl/?url=', 'https://pic1.xuehuaimg.com/proxy/', 'https://cors.netnr.workers.dev/']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个设置应当在配置内进行
参考: f187ff9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
明白了。这样就不方便白嫖rsshub.app了😂。我改一下再提交。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果有相关需求建议去 #6671 提噢
未来这些修订可能都会调整
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
留了一个基于cloudflare的url作为默认,我找到的都是基于cloudflare和akamai这两家cdn的,如有国内访问更友好的请告知。另外还是在url留了个开关。
Successfully generated as following: https://rsshub-q3pn6x6tq.vercel.app/blogs/wordpress/wjd.name/http/1 - Success
|
Successfully generated as following: https://rsshub-bi50lq48x.vercel.app/blogs/wordpress/wjd.name/http/1 - Success
|
Successfully generated as following: https://rsshub-76zo57qh9.vercel.app/blogs/wordpress/wjd.name/http/1 - **Failed**
|
Successfully generated as following: https://rsshub-76zo57qh9.vercel.app/blogs/wordpress/wjd.name/http/1 - **Failed**
|
docs/blog.md
Outdated
@@ -90,6 +90,16 @@ pageClass: routes | |||
|
|||
<Route author="Lonor" example="/blogs/wordpress/lawrence.code.blog" path="/blogs/wordpress/:domain/:https?" :paramsDesc="['WordPress 博客域名', '默认 https 协议。填写 `http`或`https`']"/> | |||
|
|||
可通过`WORDPRESS_CDN`定义链接,替换 http 图片链接为 https 链接,可供考虑的服务有: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请将说明放置在install.md
中
Successfully generated as following: https://rsshub-iie8iy7zt.vercel.app/blogs/wordpress/wjd.name/http - Success
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
该 PR 相关 Issue / Involved issue
Close #
完整路由地址 / Example for the proposed route(s)
Note: this blog is just a random blog from google for demo
新RSS检查列表 / New RSS Script Checklist
Puppeteer
? Make use ofPuppeteer
?说明 / Note
I want to subscribe a wordpress blog without https. Images won't load because chrome upgrades the embeded figures to https. By redirecting images with a cdn, it also get rid of some anti-hotlink issues.