从上一篇发布之后一个多月不到,我们的赛博大善人就更新了全新的规则,那么下面也是分享下我自己更新之后的规则叭~

目前Cloudflare提供了全新的文档供大家去使用,建议配合文档一起食用。

https://developers.cloudflare.com/cache/about/cache-rules/

规则

(http.host eq "v.warhut.cn" and http.request.uri.path in {"/static" "/libs" "/data" "/iyplayer"}) or (http.request.uri.path.extension in {"7z" "avi" "avif" "apk" "bin" "bmp" "bz2" "class" "css" "csv" "doc" "docx" "dmg" "ejs" "eot" "eps" "exe" "flac" "gif" "gz" "ico" "iso" "jar" "jpg" "jpeg" "js" "mid" "midi" "mkv" "mp3" "mp4" "ogg" "otf" "pdf" "pict" "pls" "png" "ppt" "pptx" "ps" "rar" "svg" "svgz" "swf" "tar" "tif" "tiff" "ttf" "webm" "webp" "woff" "woff2" "xls" "xlsx" "zip" "zst"})
  1. 该规则对默认静态资源进行缓存,并且同时对指定路径下的所有内容进行缓存,以确保静态资源不会被cc攻击
  2. 在使用边缘 TTL时,使用了200以内的均缓存一年,201之后缓存2小时,以达到只缓存有效链接。
  3. 下面选项确保不会被使用查询字符串反复申请原站请求。

2024-11-05T01:34:40.png

最后修改:2024 年 11 月 05 日

感谢看完,可以点个赞~请作者喝杯咖啡~ヾ(◍°∇°◍)ノ゙❤