1.0.3 • Published 3 years ago

cloudflare-page-rules v1.0.3

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

Cloudflare Page Rules

Update Cloudflare Page Rules (only pages rules) dynamically. This package was created because I couldn't find a package that works. cloudflare shown deprecation messages in the console, and the other packages only support DNS calls (I needed page rules API).

Installation

yarn add cloudflare-page-rules

Example

const CloudflarePageRules = require('cloudflare-page-rules');
const cloudflare = new CloudflarePageRules('token');

cloudflare.list('zone ID');
cloudflare.details('page rule ID', 'zone ID');
cloudflare.delete('page rule ID', 'zone ID');
cloudflare.update('page rule ID', {
    targets: [],
    actions: []
}, 'zone ID');
cloudflare.edit('page rule ID', {
    targets: [],
    actions: []
}, 'zone ID');
cloudflare.create({
    targets: [],
    actions: []
}, 'zone ID');
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago