通过Api Cloudflare API将http重定向到https

时间:2018-11-13 16:51:07

标签: python cloudflare

我尝试使用python-cloudflare:https://github.com/cloudflare/python-cloudflare

规则:曾经重定向到https。

 params = {
    "target": "url",
    "constraint": {
        "operator": "matches",
        "value": "http://*{0}*".format(domain)
    },
    "actions":
    {
        "id":"https",
        "value":"on",
        "priority":1,
        "status":"active"
    }
}

r = cf.zones.firewall.waf.packages.rules.post(zone_id, package_id=None, 
  params=params)

错误:

504服务器错误:网址的网关超时

0 个答案:

没有答案