Skip to content

Commit 76d5f16

Browse files
authored
[WAF, other] Remove line breaks after Render (#16789)
1 parent 641bfeb commit 76d5f16

File tree

6 files changed

+112
-64
lines changed

6 files changed

+112
-64
lines changed

src/content/docs/rules/index.mdx

Lines changed: 65 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,85 +6,125 @@ sidebar:
66
head:
77
- tag: title
88
content: Cloudflare Rules
9-
109
---
1110

12-
import { CardGrid, Feature, LinkTitleCard, Plan, RelatedProduct, Render } from "~/components"
11+
import {
12+
CardGrid,
13+
Feature,
14+
LinkTitleCard,
15+
Plan,
16+
RelatedProduct,
17+
Render,
18+
} from "~/components";
1319

1420
<Plan type="all" />
1521

16-
<Render file="rules-definition" /> <br/>
22+
<Render file="rules-definition" />
1723

1824
Rules features require that you [proxy the DNS records](/dns/manage-dns-records/reference/proxied-dns-records/) of your domain (or subdomain) through Cloudflare.
1925

20-
***
26+
---
2127

2228
## Features
2329

2430
<Feature header="Transform Rules" href="/rules/transform/">
25-
Adjust the URI path, query string, and HTTP headers of requests and responses on the Cloudflare global network.
31+
Adjust the URI path, query string, and HTTP headers of requests and responses
32+
on the Cloudflare global network.
2633
</Feature>
2734

28-
<Feature header="URL normalization" href="/rules/normalization/" cta="Configure URL normalization">
29-
Modify the URLs of incoming requests so that they conform to a consistent formatting standard.
35+
<Feature
36+
header="URL normalization"
37+
href="/rules/normalization/"
38+
cta="Configure URL normalization"
39+
>
40+
Modify the URLs of incoming requests so that they conform to a consistent
41+
formatting standard.
3042
</Feature>
3143

3244
<Feature header="Redirects" href="/rules/url-forwarding/">
33-
Redirect visitors from a source URL to a target URL with a specific HTTP status code. Use Single Redirects or Bulk Redirects depending on your use case.
45+
Redirect visitors from a source URL to a target URL with a specific HTTP
46+
status code. Use Single Redirects or Bulk Redirects depending on your use
47+
case.
3448
</Feature>
3549

3650
<Feature header="Origin Rules" href="/rules/origin-rules/">
37-
Customize where the incoming traffic will go and with which parameters. Override request properties such as `Host` header, destination hostname, and destination port.
51+
Customize where the incoming traffic will go and with which parameters.
52+
Override request properties such as `Host` header, destination hostname, and
53+
destination port.
3854
</Feature>
3955

4056
<Feature header="Configuration Rules" href="/rules/configuration-rules/">
41-
Customize Cloudflare configuration settings for matching incoming requests.
57+
Customize Cloudflare configuration settings for matching incoming requests.
4258
</Feature>
4359

4460
<Feature header="Compression Rules" href="/rules/compression-rules/">
45-
Customize the compression applied to responses from Cloudflare's global network to your website visitors, based on the file extension and content type.
61+
Customize the compression applied to responses from Cloudflare's global
62+
network to your website visitors, based on the file extension and content
63+
type.
4664
</Feature>
4765

4866
<Feature header="Snippets" href="/rules/snippets/">
49-
Customize the behavior of your website or application using short pieces of JavaScript code.
67+
Customize the behavior of your website or application using short pieces of
68+
JavaScript code.
5069
</Feature>
5170

52-
<Feature header="Custom error responses" href="/rules/custom-error-responses/" cta="Configure custom error responses">
53-
Define custom responses for errors returned by an origin server or by a Cloudflare product, including Workers.
71+
<Feature
72+
header="Custom error responses"
73+
href="/rules/custom-error-responses/"
74+
cta="Configure custom error responses"
75+
>
76+
Define custom responses for errors returned by an origin server or by a
77+
Cloudflare product, including Workers.
5478
</Feature>
5579

5680
<Feature header="Page Rules" href="/rules/page-rules/" cta="Use Page Rules">
57-
Trigger certain actions when a request matches a URL pattern.
81+
Trigger certain actions when a request matches a URL pattern.
5882
</Feature>
5983

60-
***
84+
---
6185

6286
## Related products
6387

6488
<RelatedProduct header="Custom rules" href="/waf/custom-rules/" product="waf">
65-
Control incoming traffic by filtering requests to a zone. You can block or challenge incoming requests according to rules you define.
89+
Control incoming traffic by filtering requests to a zone. You can block or
90+
challenge incoming requests according to rules you define.
6691
</RelatedProduct>
6792

68-
<RelatedProduct header="Rate limiting rules" href="/waf/rate-limiting-rules/" product="waf">
69-
Define rate limits for requests matching an expression, and the action to perform when those rate limits are reached.
93+
<RelatedProduct
94+
header="Rate limiting rules"
95+
href="/waf/rate-limiting-rules/"
96+
product="waf"
97+
>
98+
Define rate limits for requests matching an expression, and the action to
99+
perform when those rate limits are reached.
70100
</RelatedProduct>
71101

72-
<RelatedProduct header="Cache rules" href="/cache/how-to/cache-rules/" product="cache">
73-
Customize the cache properties of your HTTP requests.
102+
<RelatedProduct
103+
header="Cache rules"
104+
href="/cache/how-to/cache-rules/"
105+
product="cache"
106+
>
107+
Customize the cache properties of your HTTP requests.
74108
</RelatedProduct>
75109

76110
<RelatedProduct header="Workers" href="/workers/" product="workers">
77-
Cloudflare Workers provides a serverless execution environment that allows you to create new applications or augment existing ones without configuring or maintaining infrastructure.
111+
Cloudflare Workers provides a serverless execution environment that allows you
112+
to create new applications or augment existing ones without configuring or
113+
maintaining infrastructure.
78114
</RelatedProduct>
79115

80-
***
116+
---
81117

82118
## More resources
83119

84120
<CardGrid>
85121

86-
<LinkTitleCard title="Plans" href="https://www.cloudflare.com/plans/#overview" icon="document">
87-
Compare available Cloudflare plans
122+
<LinkTitleCard
123+
title="Plans"
124+
href="https://www.cloudflare.com/plans/#overview"
125+
icon="document"
126+
>
127+
Compare available Cloudflare plans
88128
</LinkTitleCard>
89129

90130
</CardGrid>

src/content/docs/rules/transform/request-header-modification/index.mdx

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ sidebar:
66
head:
77
- tag: title
88
content: HTTP request header modification rules
9-
109
---
1110

12-
import { Render } from "~/components"
11+
import { Render } from "~/components";
1312

1413
Use HTTP request header modification rules to manipulate the headers of HTTP requests sent to your origin server.
1514

@@ -31,36 +30,42 @@ linkStyle 0,2,3 stroke-width: 1px
3130
linkStyle 1 stroke-width: 3px
3231
```
3332

34-
<br/>
33+
<br />
3534

3635
To modify HTTP headers in the **response** sent to website visitors, refer to [HTTP response header modification rules](/rules/transform/response-header-modification/).
3736

3837
Through HTTP request header modification rules you can:
3938

40-
* Set the value of an HTTP request header to a literal string value, overwriting its previous value or adding a new header to the request.
41-
* Set the value of an HTTP request header according to an expression, overwriting its previous value or adding a new header to the request.
42-
* Remove an HTTP header from the request.
39+
- Set the value of an HTTP request header to a literal string value, overwriting its previous value or adding a new header to the request.
40+
- Set the value of an HTTP request header according to an expression, overwriting its previous value or adding a new header to the request.
41+
- Remove an HTTP header from the request.
4342

4443
You can create an HTTP request header modification rule [in the dashboard](/rules/transform/request-header-modification/create-dashboard/) or [via API](/rules/transform/request-header-modification/create-api/).
4544

46-
<Render file="snippets-alternative" params={{ one: "request header modifications" }} /><br />
45+
<Render
46+
file="snippets-alternative"
47+
params={{ one: "request header modifications" }}
48+
/>
4749

4850
## Important remarks
4951

50-
* You cannot modify or remove HTTP request headers whose name starts with `x-cf-` or `cf-` except for the `cf-connecting-ip` HTTP request header, which you can remove.
52+
- You cannot modify or remove HTTP request headers whose name starts with `x-cf-` or `cf-` except for the `cf-connecting-ip` HTTP request header, which you can remove.
5153

52-
* Due to protocol compliance reasons, modifying or removing request headers with [forbidden header names](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name) (such as `Accept-Encoding`) is generally not allowed in request header modification rules.
54+
- Due to protocol compliance reasons, modifying or removing request headers with [forbidden header names](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name) (such as `Accept-Encoding`) is generally not allowed in request header modification rules.
5355

54-
* You cannot modify the value of any header commonly used to identify the website visitor's IP address, such as `x-forwarded-for`, `true-client-ip`, or `x-real-ip`. Additionally, you cannot remove the `x-forwarded-for` header.
56+
- You cannot modify the value of any header commonly used to identify the website visitor's IP address, such as `x-forwarded-for`, `true-client-ip`, or `x-real-ip`. Additionally, you cannot remove the `x-forwarded-for` header.
5557

56-
* You cannot set or modify the value of `cookie` HTTP request headers, but you can remove these headers. Configuring a rule that removes the `cookie` HTTP request header will remove all `cookie` headers in matching requests.
58+
- You cannot set or modify the value of `cookie` HTTP request headers, but you can remove these headers. Configuring a rule that removes the `cookie` HTTP request header will remove all `cookie` headers in matching requests.
5759

58-
* If you modify the value of an existing HTTP request header using an expression that evaluates to an empty string (`""`) or an undefined value, the HTTP request header is **removed**.
60+
- If you modify the value of an existing HTTP request header using an expression that evaluates to an empty string (`""`) or an undefined value, the HTTP request header is **removed**.
5961

60-
* The HTTP request header removal operation will remove all request headers with the provided name.
62+
- The HTTP request header removal operation will remove all request headers with the provided name.
6163

62-
* Currently, there is a limited number of HTTP request headers that you cannot modify. Cloudflare may remove restrictions for some of these HTTP request headers when presented with valid use cases. [Create a post in the community](https://community.cloudflare.com) for consideration.
64+
- Currently, there is a limited number of HTTP request headers that you cannot modify. Cloudflare may remove restrictions for some of these HTTP request headers when presented with valid use cases. [Create a post in the community](https://community.cloudflare.com) for consideration.
6365

64-
* To use [claims inside a JSON Web Token (JWT)](/api-shield/security/jwt-validation/transform-rules/), you must first set up a token validation configuration in API Shield.
66+
- To use [claims inside a JSON Web Token (JWT)](/api-shield/security/jwt-validation/transform-rules/), you must first set up a token validation configuration in API Shield.
6567

66-
<Render file="troubleshoot-rules-with-trace" params={{ one: "HTTP request header modification rules" }} />
68+
<Render
69+
file="troubleshoot-rules-with-trace"
70+
params={{ one: "HTTP request header modification rules" }}
71+
/>

src/content/docs/rules/url-forwarding/bulk-redirects/index.mdx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ sidebar:
66
head:
77
- tag: title
88
content: Bulk Redirects
9-
109
---
1110

12-
import { Render } from "~/components"
11+
import { Render } from "~/components";
1312

1413
Bulk Redirects allow you to define a large number of URL redirects at the account level. These redirects navigate the user from a source URL to a target URL using a given HTTP status code. URL redirection is also known as URL forwarding.
1514

1615
Unlike dynamic URL redirects created in [Single Redirects](/rules/url-forwarding/single-redirects/), Bulk Redirects are essentially static — they do not support string replacement operations or regular expressions. However, you can configure URL redirect parameters that affect their URL matching behavior and their runtime behavior.
1716

18-
<Render file="snippets-alternative" params={{ one: "and customized redirect logic" }} /><br />
17+
<Render
18+
file="snippets-alternative"
19+
params={{ one: "and customized redirect logic" }}
20+
/>
1921

20-
***
22+
---
2123

2224
## Related resources
2325

24-
* [Availability](/rules/url-forwarding/#availability): Information on the Bulk Redirects quotas and features per Cloudflare plan.
25-
* [Execution order](/rules/url-forwarding/#execution-order): Execution order of the different Rules products.
26-
* [Trace a request](/fundamentals/basic-tasks/trace-request/): Use Cloudflare Trace to determine if a bulk redirect rule is triggering for a specific URL.
26+
- [Availability](/rules/url-forwarding/#availability): Information on the Bulk Redirects quotas and features per Cloudflare plan.
27+
- [Execution order](/rules/url-forwarding/#execution-order): Execution order of the different Rules products.
28+
- [Trace a request](/fundamentals/basic-tasks/trace-request/): Use Cloudflare Trace to determine if a bulk redirect rule is triggering for a specific URL.

src/content/docs/rules/url-forwarding/single-redirects/index.mdx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ sidebar:
66
head:
77
- tag: title
88
content: Single Redirects
9-
109
---
1110

12-
import { GlossaryTooltip, Render } from "~/components"
11+
import { GlossaryTooltip, Render } from "~/components";
1312

1413
Single Redirects allow you to create static or dynamic URL <GlossaryTooltip term="redirect">redirects</GlossaryTooltip>. A simple interface with [wildcard support](/ruleset-engine/rules-language/operators/#wildcard-matching) makes it easy to define source and target URL patterns without needing complex functions or regular expressions, efficiently handling thousands of URLs with a single rule. Dynamic URL redirects also support advanced features such as string replacement operations and [regular expressions](/ruleset-engine/rules-language/values/#string-values-and-regular-expressions) (depending on your Cloudflare plan).
1514

16-
<Render file="snippets-alternative" params={{ one: "and customized redirect logic" }} /><br />
15+
<Render
16+
file="snippets-alternative"
17+
params={{ one: "and customized redirect logic" }}
18+
/>
1719

18-
***
20+
---
1921

2022
## Related resources
2123

22-
* [Availability](/rules/url-forwarding/#availability): Information on the Single Redirects quotas and features per Cloudflare plan.
23-
* [Execution order](/rules/url-forwarding/#execution-order): Execution order of the different Rules products.
24-
* [Trace a request](/fundamentals/basic-tasks/trace-request/): Use Cloudflare Trace to determine if a redirect rule is triggering for a specific URL.
24+
- [Availability](/rules/url-forwarding/#availability): Information on the Single Redirects quotas and features per Cloudflare plan.
25+
- [Execution order](/rules/url-forwarding/#execution-order): Execution order of the different Rules products.
26+
- [Trace a request](/fundamentals/basic-tasks/trace-request/): Use Cloudflare Trace to determine if a redirect rule is triggering for a specific URL.

src/content/docs/ruleset-engine/rules-language/expressions/index.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ sidebar:
66
head:
77
- tag: title
88
content: Rule expressions
9-
109
---
1110

12-
import { Render } from "~/components"
11+
import { Render } from "~/components";
1312

1413
The Rules language supports two kinds of expressions: simple and compound.
1514

@@ -29,11 +28,11 @@ Simple expressions have the following syntax:
2928

3029
Where:
3130

32-
* [Fields](/ruleset-engine/rules-language/fields/) specify properties associated with an HTTP request.
31+
- [Fields](/ruleset-engine/rules-language/fields/) specify properties associated with an HTTP request.
3332

34-
* [Comparison operators](/ruleset-engine/rules-language/operators/#comparison-operators) define how values must relate to actual request data for an expression to return `true`.
33+
- [Comparison operators](/ruleset-engine/rules-language/operators/#comparison-operators) define how values must relate to actual request data for an expression to return `true`.
3534

36-
* [Values](/ruleset-engine/rules-language/values/) represent the data associated with fields. When evaluating a rule, Cloudflare compares these values with the actual data obtained from the request.
35+
- [Values](/ruleset-engine/rules-language/values/) represent the data associated with fields. When evaluating a rule, Cloudflare compares these values with the actual data obtained from the request.
3736

3837
## Compound expressions
3938

@@ -55,14 +54,14 @@ Compound expressions allow you to generate sophisticated, highly targeted rules.
5554

5655
## Maximum rule expression length
5756

58-
<Render file="max-expression-length" /> <br/>
57+
<Render file="max-expression-length" />
5958

6059
This limit applies whether you use the visual [Expression Builder](/ruleset-engine/rules-language/expressions/edit-expressions/#expression-builder) to define your expression, or write the expression manually in the [Expression Editor](/ruleset-engine/rules-language/expressions/edit-expressions/#expression-editor).
6160

6261
## Additional features
6362

6463
You can also use the following Rules language features in your expressions:
6564

66-
* [Grouping symbols](/ruleset-engine/rules-language/operators/#grouping-symbols) allow you to explicitly group expressions that should be evaluated together.
65+
- [Grouping symbols](/ruleset-engine/rules-language/operators/#grouping-symbols) allow you to explicitly group expressions that should be evaluated together.
6766

68-
* [Functions](/ruleset-engine/rules-language/functions/) allow you to manipulate and validate values in expressions.
67+
- [Functions](/ruleset-engine/rules-language/functions/) allow you to manipulate and validate values in expressions.

src/content/docs/waf/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Get automatic protection from vulnerabilities and the flexibility to create cust
2626

2727
<Plan type="all" />
2828

29-
<Render file="waf-intro" /> <br />
29+
<Render file="waf-intro" />
3030

3131
Learn how to [get started](/waf/get-started/).
3232

0 commit comments

Comments
 (0)