Skip to content

Commit f30847d

Browse files
[WAF, Rules] Remove single-use partials (#24548)
--------- Co-authored-by: Maddy <[email protected]>
1 parent 3712894 commit f30847d

File tree

13 files changed

+62
-117
lines changed

13 files changed

+62
-117
lines changed

src/content/docs/fundamentals/manage-domains/redirect-domain.mdx

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
pcx_content_type: reference
33
title: Redirect one domain to another
4-
54
---
65

7-
import { Render } from "~/components"
6+
import { Render, Example } from "~/components";
87

98
If you have an alias domain that only forwards traffic to another domain (that is, the domain does not have an associated origin server of its own), you can set up redirects directly within Cloudflare.
109

@@ -21,4 +20,31 @@ If you have an alias domain that only forwards traffic to another domain (that i
2120

2221
3. Use [Redirect rules](/rules/url-forwarding/) to forward traffic from your alias domain to your other domain.
2322

24-
<Render file="url-forwarding/different-hostname-example" product="rules" />
23+
This example will redirect all requests for `smallshop.example.com` to a different hostname using HTTPS, keeping the original path and query string.
24+
25+
<Example>
26+
27+
**When incoming requests match**
28+
- **Field:** _Hostname_
29+
- **Operator:** _equals_
30+
- **Value:** `smallshop.example.com`
31+
32+
If you are using the Expression Editor, enter the following expression:<br/>
33+
`(http.host eq "smallshop.example.com")`
34+
35+
**Then**
36+
- **Type:** _Dynamic_
37+
- **Expression:** `concat("https://globalstore.example.net", http.request.uri.path)`
38+
- **Status code:** _301_
39+
- **Preserve query string:** Enabled
40+
41+
</Example>
42+
43+
For example, the redirect rule would perform the following redirects:
44+
45+
| Request URL | Target URL | Status code |
46+
| ----------------------------------------------------- | -------------------------------------------------------- | ----------- |
47+
| `http://smallshop.example.com/` | `https://globalstore.example.net/` | `301` |
48+
| `http://smallshop.example.com/admin/?logged_out=true` | `https://globalstore.example.net/admin/?logged_out=true` | `301` |
49+
| `https://smallshop.example.com/?all_items=1` | `https://globalstore.example.net/?all_items=1` | `301` |
50+
| `http://example.com/about/` | (unchanged) | n/a |

src/content/docs/learning-paths/application-security/firewall/managed-rules.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ title: Managed Rules
33
pcx_content_type: overview
44
sidebar:
55
order: 2
6-
76
---
87

9-
import { Render } from "~/components"
8+
import { Render } from "~/components";
109

1110
<Render file="waf-managed-rules-intro" product="waf" />
1211

1312
## Rulesets
1413

1514
By default, Cloudflare offers the following rulesets:
1615

17-
<Render file="waf-rulesets" product="waf" />
16+
- [Cloudflare Managed Ruleset](/waf/managed-rules/reference/cloudflare-managed-ruleset/)
17+
- [Cloudflare OWASP Core Ruleset](/waf/managed-rules/reference/owasp-core-ruleset/)
18+
- [Cloudflare Exposed Credentials Check Managed Ruleset](/waf/managed-rules/reference/exposed-credentials-check/)

src/content/docs/rules/index.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ import {
1515
LinkTitleCard,
1616
Plan,
1717
RelatedProduct,
18-
Render,
1918
} from "~/components";
2019

2120
<Plan type="all" />
2221

23-
<Render file="rules-definition" />
22+
Cloudflare Rules allows you to make adjustments to requests and responses, configure Cloudflare settings, and trigger specific actions for matching requests.
2423

2524
Rules features require that you [proxy the DNS records](/dns/proxy-status/) of your domain (or subdomain) through Cloudflare.
2625

@@ -83,8 +82,8 @@ Rules features require that you [proxy the DNS records](/dns/proxy-status/) of y
8382
href="/rules/custom-errors/"
8483
cta="Configure Custom Errors"
8584
>
86-
Define what custom content to serve for errors returned by an origin server
87-
or by a Cloudflare product, including Workers.
85+
Define what custom content to serve for errors returned by an origin server or
86+
by a Cloudflare product, including Workers.
8887
</Feature>
8988

9089
---

src/content/docs/rules/page-rules/how-to/url-forwarding.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ sidebar:
77
head:
88
- tag: title
99
content: URL forwarding | Page Rules
10-
1110
---
1211

13-
import { Render } from "~/components"
12+
import { Render } from "~/components";
1413

1514
Page Rules allow you to forward or redirect traffic to a different URL, though they are just one of the [options provided by Cloudflare](/fundamentals/reference/redirects/).
1615

1716
<Render file="page-rules-migration" />
1817

19-
***
18+
---
2019

2120
## Redirect with Page Rules
2221

@@ -27,13 +26,15 @@ To configure URL forwarding or redirects using Page Rules:
2726
3. Under **Page Rules**, select **Create Page Rule**.
2827
4. Under **If the URL matches**, enter the URL or URL pattern that should match the rule. 
2928
5. In **Pick a Setting**, choose **Forwarding URL** from the drop-down menu.
30-
6. For **Select status code**, choose *301 - Permanent Redirect* or *302 - Temporary Redirect*.
29+
6. For **Select status code**, choose _301 - Permanent Redirect_ or _302 - Temporary Redirect_.
3130
7. Enter the destination URL.
3231
8. Select **Save and Deploy Page Rule**.
3332

34-
<Render file="page-rule-proxied-dns-warning" />
33+
:::note
34+
Page Rules require a [proxied DNS record](/dns/proxy-status/) to work. Page Rules will not apply to subdomains that do not exist in DNS or are not being directed to Cloudflare.
35+
:::
3536

36-
***
37+
---
3738

3839
## Forwarding examples
3940

@@ -67,7 +68,7 @@ https://example.com/products
6768

6869
If you enter the address above in the forwarding box and select **Add Rule**, within a few seconds any requests that match the pattern you entered will automatically be forwarded with an `HTTP 302` redirect status code to the new URL.
6970

70-
***
71+
---
7172

7273
## Advanced forwarding options
7374

src/content/docs/waf/managed-rules/check-for-exposed-credentials/test-configuration.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ After enabling and configuring exposed credentials checks, you may want to test
1616

1717
Cloudflare provides a special set of case-sensitive credentials for this purpose:
1818

19-
<Render file="exposed-creds-test-credentials" />
19+
- Login: `CF_EXPOSED_USERNAME` or `[email protected]`
20+
- Password: `CF_EXPOSED_PASSWORD`
2021

2122
The WAF always considers these specific credentials as having been previously exposed. Use them to force an "exposed credentials" event, which allows you to check the behavior of your current configuration.

src/content/docs/waf/tools/security-level.mdx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,24 @@ source: https://support.cloudflare.com/hc/en-us/articles/200170056-Understanding
44
title: Security Level
55
---
66

7-
import { Render } from "~/components";
7+
In the old Cloudflare dashboard, security level has the value _Always protected_ and you cannot change this setting. To turn [Under Attack mode](/fundamentals/reference/under-attack-mode/) on or off, use the separate toggle.
88

9-
<Render file="security-level-scores" product="waf" />
9+
In the new security dashboard, the Cloudflare API, and in Terraform, use security level to turn Under Attack mode on or off.
1010

11-
<Render file="threat-score-definition" product="waf" />
11+
Cloudflare's [Under Attack mode](/fundamentals/reference/under-attack-mode/) performs additional security checks to help mitigate layer 7 DDoS attacks. When you enable Under Attack mode, Cloudflare will present a JS challenge page.
1212

13+
:::caution
1314

15+
Only use [Under Attack mode](/fundamentals/reference/under-attack-mode/) when a website is under a DDoS attack. Under Attack mode may affect some actions on your domain, such as your API traffic.
1416

15-
---
17+
To enable or disable Under Attack mode for your API or any other part of your domain, create a [configuration rule](/rules/configuration-rules/).
18+
19+
:::
20+
21+
## Threat score
22+
23+
Previously, a threat score represented a Cloudflare threat score from 0–100, where 0 indicates low risk. Now, the threat score is always `0` (zero).
24+
25+
:::note[Recommendation]
26+
Currently we do not recommend creating rules based on the threat score, since this score is no longer being populated.
27+
:::

src/content/partials/rules/page-rule-proxied-dns-warning.mdx

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/content/partials/rules/rules-definition.mdx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/content/partials/rules/url-forwarding/different-hostname-example.mdx

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/content/partials/waf/exposed-creds-test-credentials.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)