「Cloudflare」修訂間的差異
跳至導覽
跳至搜尋
| 行 1: | 行 1: | ||
| − | [[分類:網路服務]] | + | [[分類:網路服務]]使用免費服務就夠了 |
===抵擋爬蟲=== | ===抵擋爬蟲=== | ||
| − | + | 登入 cloudflare.com | |
| − | + | # 到「帳戶首頁」的「網域」,點入域名 | |
| + | # 查 DNS 記錄,確定「類型:A」的域名對應 IP 的記錄是「通過 Proxy 處理」(橙色),而不是「僅 DNS」 | ||
| + | # 選擇「網路安全 / 安全性規則」 | ||
| + | #*自訂規則 | ||
| + | #*# 規則名稱:protect-wiki | ||
| + | #*#:((http.request.uri.path contains "/alWiki") or (http.request.uri.path contains "/wellBeingNg") or (http.request.uri.path contains "/wiki1231") or (http.request.uri.path contains "/wikiGrade1")) and not cf.client.bot 時採取 「受控的查問」 | ||
| + | #*# 規則名稱:block-bad-bots | ||
| + | #*#:(http.user_agent contains "curl" or http.user_agent contains "wget" or http.user_agent contains "python" or http.user_agent contains "scrapy") 時採取 「封鎖」 | ||
於 2026年4月21日 (二) 00:27 的修訂
使用免費服務就夠了
抵擋爬蟲
登入 cloudflare.com
- 到「帳戶首頁」的「網域」,點入域名
- 查 DNS 記錄,確定「類型:A」的域名對應 IP 的記錄是「通過 Proxy 處理」(橙色),而不是「僅 DNS」
- 選擇「網路安全 / 安全性規則」
- 自訂規則
- 規則名稱:protect-wiki
- ((http.request.uri.path contains "/alWiki") or (http.request.uri.path contains "/wellBeingNg") or (http.request.uri.path contains "/wiki1231") or (http.request.uri.path contains "/wikiGrade1")) and not cf.client.bot 時採取 「受控的查問」
- 規則名稱:block-bad-bots
- (http.user_agent contains "curl" or http.user_agent contains "wget" or http.user_agent contains "python" or http.user_agent contains "scrapy") 時採取 「封鎖」
- 規則名稱:protect-wiki
- 自訂規則