原本是用 Github 作为图床,感觉不太好。第一 Github 本身就不是干这个的,第二 Repo 是全公开的。研究了一下决定切换到 Backblaze。

图片预览:@vreemdear

3 Cuties

以下内容并不是教程,只是一些注意事项和补充。

为了保证足够的缓存,需要设置以下内容:

  1. Backblaze bucket settings 中将 Bucket Info 设为 60 天 {"cache-control":"max-age=5184000"}
  2. 在 Cloudflare Page rules 中将 Cache Level 设为 Cache Everything
  3. 在 Cloudflare Page rules 中将 Edge Cache TTL 设为 7 days

Rewrite:
在 Cloudflare Transform rules 中,
将 Custom filter expression 设为 (not starts_with(http.request.uri.path, "/file/<bucketname>") and http.host eq "<your_custom_domain>")
rewrite to Dynamic 设为concat("/file/<bucketname>",http.request.uri.path)
// 似乎调换顺序也会报错,不清楚原因,可能是因为没来得及缓存。