From 99c8482d3644c73016ed6159469e38b2fa67f5d7 Mon Sep 17 00:00:00 2001 From: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:38:38 +0100 Subject: [PATCH] [LP] Update custom rules page --- .../firewall/custom-rules.mdx | 19 ++++++------------- src/content/docs/waf/custom-rules/index.mdx | 7 ++----- .../docs/waf/custom-rules/skip/options.mdx | 6 ++---- .../partials/waf/custom-rules-intro.mdx | 10 ++++++++++ 4 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 src/content/partials/waf/custom-rules-intro.mdx diff --git a/src/content/docs/learning-paths/application-security/firewall/custom-rules.mdx b/src/content/docs/learning-paths/application-security/firewall/custom-rules.mdx index e1a912916a0ea2..13b2d9ef89bf04 100644 --- a/src/content/docs/learning-paths/application-security/firewall/custom-rules.mdx +++ b/src/content/docs/learning-paths/application-security/firewall/custom-rules.mdx @@ -1,23 +1,16 @@ --- -title: Custom Rules +title: Custom rules pcx_content_type: overview sidebar: order: 3 - --- -Cloudflare Rules allows you to make adjustments to requests and responses, configure Cloudflare settings, and trigger specific actions for matching requests. In addition, you can increase your security posture by including security headers to the browser or augmenting request headers with security intelligence. Cloudflare offers many ways to manipulate your traffic: - -1. [**Transform Rules**](/rules/transform/) enable the modification of the URI path, query string, and HTTP headers for both requests and responses on its global network. This feature provides extensive control over HTTP traffic, allowing users to rewrite URLs, modify request and response headers, and apply common adjustments easily. - -2. [**URL normalization rules**](/rules/normalization/) normalizes all requests before they pass to subsequent global network features that accept a URL input, such as WAF custom rules, Workers, and Access. Rule expressions that filter traffic based on URLs will therefore trigger correctly, regardless of the format of the incoming URL. When URL normalization is disabled, Cloudflare forwards the URL to origin in its original form. - -3. [**Redirect rules**](/rules/url-forwarding/) navigates the user from a source URL to a target URL with a specific HTTP status code. This can be done using [single redirects](/rules/url-forwarding/single-redirects/) (per domain) or [bulk redirects](/rules/url-forwarding/bulk-redirects/) (per account). +import { Render } from "~/components"; -4. [**Origin rules**](/rules/origin-rules/) allows you to customize where the incoming traffic will go and with which parameters. Currently you can perform the following overrides: host header, Server Name Indication, DNS record, and destination port. + -5. [**Configuration rules**](/rules/configuration-rules/) allows you to customize certain Cloudflare configuration settings for matching incoming requests. +The [custom rules documentation](/waf/custom-rules/) includes examples for common use cases. -6. [**Compression rules**](/rules/compression-rules/) allows you to customize the default behavior, which includes defining preferred compression algorithms for particular file types. +## Skip rules -7. [**Snippets**](/rules/snippets/) provides a flexible way to customize the behavior of your website or application using short pieces of JavaScript code. Use snippets to customize HTTP response headers, implement JWT validation, define complex redirect functionality, and more. +You can skip one or more Cloudflare security features using a custom rule [configured with the _Skip_ action](/waf/custom-rules/skip/). These rules are also known as skip rules. Refer to [Skip options](/waf/custom-rules/skip/options/) for more information on the features you can skip. diff --git a/src/content/docs/waf/custom-rules/index.mdx b/src/content/docs/waf/custom-rules/index.mdx index e401598e63af74..53fca3183eeaa2 100644 --- a/src/content/docs/waf/custom-rules/index.mdx +++ b/src/content/docs/waf/custom-rules/index.mdx @@ -5,12 +5,9 @@ sidebar: order: 5 --- -Custom rules allow you to control incoming traffic by filtering requests to a zone. You can perform actions like _Block_ or _Managed Challenge_ on incoming requests according to rules you define. +import { Render } from "~/components"; -Like other rules evaluated by Cloudflare's [Ruleset Engine](/ruleset-engine/), custom rules have the following basic parameters: - -- An [expression](/ruleset-engine/rules-language/expressions/) that specifies the criteria you are matching traffic on using the [Rules language](/ruleset-engine/rules-language/). -- An [action](/ruleset-engine/rules-language/actions/) that specifies what to perform when there is a match for the rule. + Custom rules are evaluated in order, and some actions like _Block_ will stop the evaluation of other rules. For more details on actions and their behavior, refer to the [actions reference](/ruleset-engine/rules-language/actions/). diff --git a/src/content/docs/waf/custom-rules/skip/options.mdx b/src/content/docs/waf/custom-rules/skip/options.mdx index 87925809a37948..97de64c7cd9d0a 100644 --- a/src/content/docs/waf/custom-rules/skip/options.mdx +++ b/src/content/docs/waf/custom-rules/skip/options.mdx @@ -1,11 +1,9 @@ --- -title: Skip options +title: Available skip options pcx_content_type: reference sidebar: order: 4 -head: - - tag: title - content: Available skip options + label: Skip options --- The available skip options in custom rules are the following: diff --git a/src/content/partials/waf/custom-rules-intro.mdx b/src/content/partials/waf/custom-rules-intro.mdx new file mode 100644 index 00000000000000..8b989f5bca6366 --- /dev/null +++ b/src/content/partials/waf/custom-rules-intro.mdx @@ -0,0 +1,10 @@ +--- +{} +--- + +Custom rules allow you to control incoming traffic by filtering requests to a zone. You can perform actions like _Block_ or _Managed Challenge_ on incoming requests according to rules you define. + +Like other rules evaluated by Cloudflare's [Ruleset Engine](/ruleset-engine/), custom rules have the following basic parameters: + +- An [expression](/ruleset-engine/rules-language/expressions/) that specifies the criteria you are matching traffic on using the [Rules language](/ruleset-engine/rules-language/). +- An [action](/ruleset-engine/rules-language/actions/) that specifies what to perform when there is a match for the rule.