Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Instead of relying on the automatic creation of an entry point ruleset, you can

<Details header="Example: Set the rules of a phase entry point ruleset at the zone level">

The following example sets the rules of a phase entry point ruleset at the zone level for the `http_request_firewall_managed` phase using the [Update a zone ruleset](/api/resources/rulesets/methods/update/) operation.
The following example sets the rules of a phase entry point ruleset at the zone level for the `http_request_firewall_managed` phase using the [Update a zone entry point ruleset](/api/resources/rulesets/subresources/phases/methods/update/) operation.

```bash
curl --request PUT \
https://api.cloudflare.com/client/v4/zones/{zone_id}/phases/http_request_firewall_managed/entrypoint \
https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/phases/http_request_firewall_managed/entrypoint \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Tag overrides take precedence over ruleset overrides. Only the rules with the sp

## Example 1

This example uses the [Update ruleset](/ruleset-engine/rulesets-api/update/) operation to deploy the Cloudflare Managed Ruleset to a phase with only Joomla rules enabled. The `name`, `kind`, and `phase` fields are omitted from the request because they are immutable.
This example uses the [Update a zone entry point ruleset](/ruleset-engine/rulesets-api/update/) operation to deploy the Cloudflare Managed Ruleset to a phase with only Joomla rules enabled. The `name`, `kind`, and `phase` fields are omitted from the request because they are immutable.

<Details header="Example: Enable only Joomla rules using category overrides at the zone level">

Expand Down Expand Up @@ -178,10 +178,10 @@ The order of the overrides in the root ruleset affects whether rules in the depl

The following table shows the status of the rules after the overrides.

| Rule in managed ruleset | Tags | Rule status after overrides |
| ----------------------- | ---------------------- | --------------------------- |
| ManagedRule1 | drupal, dos | disabled |
| ManagedRule2 | drupal, dos, joomla | enabled |
| ManagedRule3 | dos, joomla, wordpress | disabled |
| ManagedRule4 | drupal, wordpress | disabled |
| ManagedRule5 | (no tags) | disabled |
| Rule in managed ruleset | Tags | Rule status after overrides |
| ----------------------- | ---------------------------- | --------------------------- |
| ManagedRule1 | `drupal`, `dos` | disabled |
| ManagedRule2 | `drupal`, `dos`, `joomla` | enabled |
| ManagedRule3 | `dos`, `joomla`, `wordpress` | disabled |
| ManagedRule4 | `drupal`, `wordpress` | disabled |
| ManagedRule5 | (no tags) | disabled |
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Follow the steps below to create a rule that executes a managed ruleset and defi
1. [Add a rule](/ruleset-engine/basic-operations/deploy-rulesets/) to a phase entry point ruleset that executes a managed ruleset.
2. [Configure a tag override](/ruleset-engine/managed-rulesets/override-managed-ruleset/) that sets a specified action for all rules with a given tag.

The example below uses the [Update ruleset](/ruleset-engine/rulesets-api/update/) operation to perform the two steps in a single `PUT` request.
The example below uses the [Update a zone entry point ruleset](/ruleset-engine/rulesets-api/update/) operation to perform the two steps in a single `PUT` request.

- Add a rule to the ruleset of the `http_request_firewall_managed` phase that applies the **Cloudflare Managed Ruleset**.
- Override rules with the `wordpress` tag to set the action to `block`. All other rules use the default action provided by the ruleset issuer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Use a ruleset override and a rule override in a phase entry point ruleset to exe

<Details header="Example: Configure ruleset and rule overrides at the zone level">

The following `PUT` request uses the [Update ruleset](/ruleset-engine/rulesets-api/update/) operation at the zone level to execute only two rules from a managed ruleset in the `http_request_firewall_managed` phase.
The following `PUT` request uses the [Update a zone entry point ruleset](/ruleset-engine/rulesets-api/update/) operation to execute only two rules from a managed ruleset in the `http_request_firewall_managed` phase.

In this example:

Expand Down Expand Up @@ -63,7 +63,7 @@ https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/phases/http_reques

<Details header="Example: Configure ruleset and rule overrides at the account level">

The following `PUT` request uses the [Update ruleset](/ruleset-engine/rulesets-api/update/) operation at the account level to execute only two rules from a managed ruleset in the `http_request_firewall_managed` phase.
The following `PUT` request uses the [Update an account entry point ruleset](/ruleset-engine/rulesets-api/update/) operation to execute only two rules from a managed ruleset in the `http_request_firewall_managed` phase.

In this example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Follow the steps below to override the sensitivity of a specific rule of the Clo
1. [Add a rule](/ruleset-engine/basic-operations/deploy-rulesets/) to a phase to deploy the Cloudflare HTTP DDoS Attack Protection managed ruleset. You only need to deploy this specific ruleset when you wish to define one or more overrides, since it is enabled by default.
2. [Configure a rule override](/ruleset-engine/managed-rulesets/override-managed-ruleset/) that sets the `sensitivity_level` of a specific rule.

The example below uses the [Update ruleset](/ruleset-engine/rulesets-api/update/) operation to execute the steps in a single `PUT` request.
The example below uses the [Update a zone entry point ruleset](/ruleset-engine/rulesets-api/update/) operation to execute the steps in a single `PUT` request.

- Add a rule to the ruleset of the `ddos_l7` phase that applies the Cloudflare HTTP DDoS Attack Protection managed ruleset (with ID `<HTTP_DDOS_RULESET_ID>`).
- Create an override for the rule with ID `<RULE_ID>` and set the rule sensitivity to `low`. All other rules use the default sensitivity defined by Cloudflare.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Customize the execution of managed rulesets with a combination of ruleset overri
3. [Configure a tag override](/ruleset-engine/managed-rulesets/override-managed-ruleset/) that sets an action for rules with a given tag.
4. [Configure a rule override](/ruleset-engine/managed-rulesets/override-managed-ruleset/) that sets an action for the rules you want to execute.

The request below uses the [Update ruleset](/ruleset-engine/rulesets-api/update/) operation to execute the following in a single `PUT` request:
The request below uses the [Update a zone entry point ruleset](/ruleset-engine/rulesets-api/update/) operation to execute the following in a single `PUT` request:

- Add a rule to the `http_request_firewall_managed` phase entry point ruleset that executes a managed ruleset.
- Use category overrides to enable rules with `wordpress` and `drupal` tags and set their actions to `log`.
Expand Down
Loading