Skip to content

Commit 43225a6

Browse files
[Fundamentals] Update http-headers.mdx (#19516)
* Update http-headers.mdx * Update src/content/docs/fundamentals/reference/http-headers.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/fundamentals/reference/http-headers.mdx Co-authored-by: ToriLindsay <[email protected]> --------- Co-authored-by: ToriLindsay <[email protected]>
1 parent 582191f commit 43225a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/content/docs/fundamentals/reference/http-headers.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Currently, this header is a JSON object, containing only one key called `scheme`
117117

118118
### CF-Worker
119119

120-
The `CF-Worker` request header is added to an edge Worker subrequest that identifies the host that spawned the subrequest. This is useful when you want to protect yourself against cross-zone Worker subrequests. For example: `CF-Worker: example.com`.
120+
The `CF-Worker` request header is added to an edge Worker subrequest that identifies the host that spawned the subrequest. For example: `CF-Worker: example.com`.
121121

122122
You can add `CF-Worker` header on server logs similar to the way you add the [`CF-RAY`](/support/troubleshooting/general-troubleshooting/gathering-information-for-troubleshooting-sites/#add-the-cf-ray-header-to-your-logs) header. To do that, add `$http_cf_worker` in the log format file: `log_format cf_custom "CF-Worker:$http_cf_worker"'`
123123

@@ -131,6 +131,10 @@ The intended purpose of this header is to provide a means for recipients (for ex
131131

132132
:::note
133133
When configuring WAF custom rules, do not match on this header. These rules are applied before Cloudflare adds the `CF-Worker` header. Instead, use the [`cf.worker.upstream_zone`](/ruleset-engine/rules-language/fields/reference/cf.worker.upstream_zone/) field, which contains the same value and exists for the same purpose.
134+
135+
To block a specific Worker, add a `Block` action triggered by the expression `cf.worker.upstream_zone eq "example.com"`.
136+
137+
To block all Worker subrequests except those from your own zone's Worker, add a `Block` action triggered by the expression `not (cf.worker.upstream_zone in {"" "customer-zone.com"})`.
134138
:::
135139

136140
### Connection

0 commit comments

Comments
 (0)