UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

43 lines 2.38 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.WAF = void 0; const resource_1 = require("cloudflare/resource"); class WAF extends resource_1.APIResource { /** * The WAF examines HTTP requests to your website. It inspects both GET and POST * requests and applies rules to help filter out illegitimate traffic from * legitimate website visitors. The Cloudflare WAF inspects website addresses or * URLs to detect anything out of the ordinary. If the Cloudflare WAF determines * suspicious user behavior, then the WAF will 'challenge' the web visitor with a * page that asks them to submit a CAPTCHA successfully to continue their action. * If the challenge is failed, the action will be stopped. What this means is that * Cloudflare's WAF will block any traffic identified as illegitimate before it * reaches your origin web server. * (https://support.cloudflare.com/hc/en-us/articles/200172016). */ edit(params, options) { const { zone_id, ...body } = params; return this._client.patch(`/zones/${zone_id}/settings/waf`, { body, ...options })._thenUnwrap((obj) => obj.result); } /** * The WAF examines HTTP requests to your website. It inspects both GET and POST * requests and applies rules to help filter out illegitimate traffic from * legitimate website visitors. The Cloudflare WAF inspects website addresses or * URLs to detect anything out of the ordinary. If the Cloudflare WAF determines * suspicious user behavior, then the WAF will 'challenge' the web visitor with a * page that asks them to submit a CAPTCHA successfully to continue their action. * If the challenge is failed, the action will be stopped. What this means is that * Cloudflare's WAF will block any traffic identified as illegitimate before it * reaches your origin web server. * (https://support.cloudflare.com/hc/en-us/articles/200172016). */ get(params, options) { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/settings/waf`, options)._thenUnwrap((obj) => obj.result); } } exports.WAF = WAF; (function (WAF) { })(WAF = exports.WAF || (exports.WAF = {})); //# sourceMappingURL=waf.js.map