Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/content/docs/rules/cloud-connector/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Cloud Connector (beta) allows you to route matching incoming traffic from your w

<Render
file="rules-requirements"
params={{ one: "Cloud Connector requires" }}
params={{ sentenceIntro: "Cloud Connector requires" }}
/>

## How it works
Expand Down
5 changes: 4 additions & 1 deletion src/content/docs/rules/compression-rules/create-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ When creating a compression rule via API, make sure you:

<Render
file="rules-creation-workflow"
params={{ one: "a compression rule", two: "http_response_compression" }}
params={{
ruleName: "a compression rule",
phaseName: "http_response_compression",
}}
/>

## Examples
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/rules/compression-rules/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ When there is a match for a compression rule configured with several compression

<Render
file="rules-requirements"
params={{ one: "Compression Rules require" }}
params={{ sentenceIntro: "Compression Rules require" }}
/>

## Get started
Expand Down
25 changes: 13 additions & 12 deletions src/content/docs/rules/configuration-rules/create-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,34 @@ sidebar:
head:
- tag: title
content: Create a configuration rule via API

---

import { Details, Render } from "~/components"
import { Details, Render } from "~/components";

Use the [Rulesets API](/ruleset-engine/rulesets-api/) to create configuration rules via API.

## Basic rule settings

When creating a configuration rule via API, make sure you:

* Set the rule action to `set_config`.
* Define the parameters in the `action_parameters` field according to the [settings](/rules/configuration-rules/settings/) you wish to override for matching requests.
* Deploy the rule to the `http_config_settings` phase at the zone level.
- Set the rule action to `set_config`.
- Define the parameters in the `action_parameters` field according to the [settings](/rules/configuration-rules/settings/) you wish to override for matching requests.
- Deploy the rule to the `http_config_settings` phase at the zone level.

## Procedure

<Render file="rules-creation-workflow" params={{ one: "a configuration rule", two: "http_config_settings" }} />
<Render
file="rules-creation-workflow"
params={{
ruleName: "a configuration rule",
phaseName: "http_config_settings",
}}
/>

Make sure your API token has the [required permissions](#required-api-token-permissions) to perform the API operations.

## Example requests


<Details header="Example: Add a rule that enables Email Obfuscation and Browser Integrity Check">

The following example sets the rules of an existing phase ruleset (`{ruleset_id}`) to a single configuration rule — enabling Email Obfuscation and Browser Integrity Check for the contacts page — using the [Update a zone ruleset](/api/resources/rulesets/methods/update/) operation:
Expand All @@ -55,10 +59,8 @@ https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id} \
}'
```


</Details>


<Details header="Example: Add a rule that turns on I'm Under Attack mode for the admin area">

The following example sets the rules of an existing phase ruleset (`{ruleset_id}`) to a single configuration rule — turning on I'm Under Attack mode for the administration area — using the [Update a zone ruleset](/api/resources/rulesets/methods/update/) operation:
Expand All @@ -82,13 +84,12 @@ https://api.cloudflare.com/client/v4/zones/{zone_id}/rulesets/{ruleset_id} \
}'
```


</Details>

***
---

## Required API token permissions

The API token used in API requests to manage configuration rules must have at least the following permission:

* *Zone* > *Config Rules* > *Edit*
- _Zone_ > _Config Rules_ > _Edit_
2 changes: 1 addition & 1 deletion src/content/docs/rules/configuration-rules/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The configuration rule expression will determine to which requests the rule sett

<Render
file="rules-requirements"
params={{ one: "Configuration Rules require" }}
params={{ sentenceIntro: "Configuration Rules require" }}
/>

---
Expand Down
63 changes: 16 additions & 47 deletions src/content/docs/rules/configuration-rules/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ sidebar:
head:
- tag: title
content: Configuration Rules settings

---

import { Details, Render } from "~/components"
import { Details, Render } from "~/components";

You can change the configuration settings described below in a configuration rule.

Expand All @@ -19,7 +18,6 @@ You can change the configuration settings described below in a configuration rul

Use this setting to turn on or off Automatic HTTPS Rewrites for matching requests.


<Details header="API information">

API configuration property name: `"automatic_https_rewrites"` (boolean).
Expand All @@ -32,7 +30,6 @@ API configuration property name: `"automatic_https_rewrites"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Browser Integrity Check
Expand All @@ -41,7 +38,6 @@ API configuration property name: `"automatic_https_rewrites"` (boolean).

Use this setting to turn on or off Browser Integrity Check for matching requests.


<Details header="API information">

API configuration property name: `"bic"` (boolean).
Expand All @@ -54,7 +50,6 @@ API configuration property name: `"bic"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Disable Apps
Expand All @@ -63,7 +58,6 @@ API configuration property name: `"bic"` (boolean).

Use this setting to turn off all active Cloudflare Apps for matching requests.


<Details header="API information">

API configuration property name: `"disable_apps"` (boolean).
Expand All @@ -76,7 +70,6 @@ API configuration property name: `"disable_apps"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Disable Real User Monitoring (RUM)
Expand All @@ -85,8 +78,7 @@ API configuration property name: `"disable_apps"` (boolean).

Use this setting to turn off Web Analytics for matching requests.

<Render file="configuration-rule-wins-over-rum-rule" params={{ one: "Configuration rules", two: "Web Analytics rules" }} />

<Render file="configuration-rule-wins-over-rum-rule" />

<Details header="API information">

Expand All @@ -100,7 +92,6 @@ API configuration property name: `"disable_rum"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Disable Zaraz
Expand All @@ -109,7 +100,6 @@ API configuration property name: `"disable_rum"` (boolean).

Use this setting to turn off Zaraz for matching requests.


<Details header="API information">

API configuration property name: `"disable_zaraz"` (boolean).
Expand All @@ -122,7 +112,6 @@ API configuration property name: `"disable_zaraz"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Hotlink Protection
Expand All @@ -131,7 +120,6 @@ API configuration property name: `"disable_zaraz"` (boolean).

Use this setting to turn on or off Hotlink Protection for matching requests.


<Details header="API information">

API configuration property name: `"hotlink_protection"` (boolean).
Expand All @@ -144,7 +132,6 @@ API configuration property name: `"hotlink_protection"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Email Obfuscation
Expand All @@ -153,7 +140,6 @@ API configuration property name: `"hotlink_protection"` (boolean).

Use this setting to turn on or off Email Obfuscation for matching requests.


<Details header="API information">

API configuration property name: `"email_obfuscation"` (boolean).
Expand All @@ -166,7 +152,6 @@ API configuration property name: `"email_obfuscation"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Fonts
Expand All @@ -175,7 +160,6 @@ API configuration property name: `"email_obfuscation"` (boolean).

Use this setting to turn on or off Cloudflare Fonts for matching requests.


<Details header="API information">

API configuration property name: `"fonts"` (boolean).
Expand All @@ -188,7 +172,6 @@ API configuration property name: `"fonts"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Mirage
Expand All @@ -197,7 +180,6 @@ API configuration property name: `"fonts"` (boolean).

Use this setting to turn on or off Mirage for matching requests.


<Details header="API information">

API configuration property name: `"mirage"` (boolean).
Expand All @@ -210,7 +192,6 @@ API configuration property name: `"mirage"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Opportunistic Encryption
Expand All @@ -219,7 +200,6 @@ API configuration property name: `"mirage"` (boolean).

Use this setting to turn on or off Opportunistic Encryption for matching requests.


<Details header="API information">

API configuration property name: `"opportunistic_encryption"` (boolean).
Expand All @@ -232,7 +212,6 @@ API configuration property name: `"opportunistic_encryption"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Polish
Expand All @@ -241,13 +220,12 @@ API configuration property name: `"opportunistic_encryption"` (boolean).

Use this setting to configure Polish for matching requests:

* Off
* Lossless
* Lossy
- Off
- Lossless
- Lossy

Refer to [Compression options](/images/polish/compression/#compression-options) for more information on these values.


<Details header="API information">

API configuration property name: `"polish"` (string).
Expand All @@ -262,7 +240,6 @@ API values: `"off"`, `"lossless"`, `"lossy"`.

<Render file="configuration-rule-link-to-examples" />


</Details>

## Rocket Loader
Expand All @@ -271,7 +248,6 @@ API values: `"off"`, `"lossless"`, `"lossy"`.

Use this setting to turn on or off Rocket Loader for matching requests.


<Details header="API information">

API configuration property name: `"rocket_loader"` (boolean).
Expand All @@ -284,7 +260,6 @@ API configuration property name: `"rocket_loader"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>

## Security Level
Expand All @@ -293,16 +268,15 @@ API configuration property name: `"rocket_loader"` (boolean).

Use this setting to select the security level for matching requests:

* Off
* Essentially Off
* Low
* Medium
* High
* I'm Under Attack
- Off
- Essentially Off
- Low
- Medium
- High
- I'm Under Attack

Refer to [Security levels](/waf/tools/security-level/#security-levels) for more information on these values.


<Details header="API information">

API configuration property name: `"security_level"` (string).
Expand All @@ -317,7 +291,6 @@ API values: `"off"`, `"essentially_off"`, `"low"`, `"medium"`, `"high"`, `"under

<Render file="configuration-rule-link-to-examples" />


</Details>

## SSL
Expand All @@ -326,15 +299,14 @@ API values: `"off"`, `"essentially_off"`, `"low"`, `"medium"`, `"high"`, `"under

Use this setting to configure the SSL/TLS encryption mode for matching requests:

* Off
* Flexible
* Full
* Strict
* Origin Pull
- Off
- Flexible
- Full
- Strict
- Origin Pull

Refer to [Available encryption modes](/ssl/origin-configuration/ssl-modes/#available-encryption-modes) for more information on these values.


<Details header="API information">

API configuration property name: `"ssl"` (string).
Expand All @@ -349,7 +321,6 @@ API values: `"off"`, `"flexible"`, `"full"`, `"strict"`, `"origin_pull"`.

<Render file="configuration-rule-link-to-examples" />


</Details>

## SXG
Expand All @@ -358,7 +329,6 @@ API values: `"off"`, `"flexible"`, `"full"`, `"strict"`, `"origin_pull"`.

Use this setting to turn on or off signed exchanges for matching requests.


<Details header="API information">

API configuration property name: `"sxg"` (boolean).
Expand All @@ -371,5 +341,4 @@ API configuration property name: `"sxg"` (boolean).

<Render file="configuration-rule-link-to-examples" />


</Details>
Loading
Loading