This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
一个使用cloudflare页面规则实现干净的图床URL的方法 #466
MuZhou233
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
可以考虑换个域名? |
Beta Was this translation helpful? Give feedback.
1 reply
-
可以参考一下next.js自带的路由功能
e.g.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
效果
能够使用形如
https://example.com/image/favicon.jpg?raw
的格式获取到原始数据,和旧项目onedrive-cloudflare-index
的格式一致缺点
方法
在下面的例子中,域名为
example.com
,需要使用的图片文件均在images
文件夹中,你可以根据自己的实际情况更换如果有多个文件夹,则可以通过创建多个页面规则实现,但注意免费计划仅能创建三个
匹配URL
为example.com/images/*?raw
,选取设置
为转发URL
,状态代码
随意,目标URL
为https://example.com/api/raw/?path=/images/$1
扩展
Beta Was this translation helpful? Give feedback.
All reactions