Note: This library is under active development as I expand it to cover Cloudflare API. Consider the public API of this package a little unstable as I work towards a v1.0. See Coverage.

PageRule

Usage

Cloudflare API provides extensive configuration for Page Rules, this helper aims to simplify it.

php

use Cloudflare\Configurations\Zones\PageRule;

$pageRule = new PageRule('example.com/*');

$pageRule
    ->enable()
    ->cacheLevel('simplified')
    ->disableZaraz(true);

$response = $client->zones()->pageRules()->create('zone_id', $pageRule);