Pro、Business、Enterprise のお客様は、Cloudflare のボット対策で 静的リソース をボットから保護できます。
Pro または Business のお客様、あるいは Bot Management のない Enterprise のお客様として、この機能を有効にするには次の手順を実行します。
-
Cloudflare ダッシュボードで Security Settings ページを開きます。
Settings を開く ↗ -
Bot traffic で絞り込みます。
-
Super Bot Fight Mode に移動します。
-
Configurations で Static resource protection の編集アイコンを選択し、オンにします。
cf.bot_management.score を使う カスタムルール を作成すると、静的リソースはデフォルトで保護されます。
静的リソースを除外するには、カスタムルールに not (cf.bot_management.static_resource) を含めます。
静的リソースは、次の拡張子のファイルです。
ico|jpg|png|jpeg|gif|css|js|tif|tiff|bmp|pict|webp|svg|svgz|class|jar|txt|csv|doc|docx|xls|xlsx|pdf|ps|pls|ppt|pptx|ttf|otf|woff|woff2|eot|eps|ejs|swf|torrent|midi|mid|m3u8|m4a|mp3|ogg|ts
さらに、/.well-known/ URL パスとその配下の要素はすべて、拡張子に関係なく静的リソースとみなされます。