首页 > 解决方案 > 如何将 CloudFlare 规则转换为 HAPROXY?

问题描述

我正在尝试将以下规则转换为 HAPROXY 规则,但由于某种原因它不起作用。也许有人可以帮忙。

CF 规则

(http.request.method eq "GET" and http.request.uri.query eq "" and http.request.version eq "HTTP/1.1" and any(len(http.request.headers.values[*])[*] gt 60) )

Cloudflare 防火墙规则页面:(https://developers.cloudflare.com/firewall/cf-firewall-language/fields#dynamic-fields “文档”)

尝试了一些没有 http 版本和查询字符串的简单操作,但仍然无法正常工作。

代理:

 acl test1 hdr_cnt() gt 60
 http-request deny  if METH_GET test1

也尝试了以下相同的方法,但没有奏效

req.fhdr_cnt

标签: configurationhaproxycloudflarerules

解决方案


推荐阅读