cloudflare-page-rules

1.0.3 • Public • Published

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');

Readme

Keywords

none

Package Sidebar

Install

npm i cloudflare-page-rules

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

4.8 kB

Total Files

5

Last publish

Collaborators

  • androz2091