Skip to content

Commit b02f28d

Browse files
committed
[Rules] Clarify request header removal
1 parent f319175 commit b02f28d

File tree

1 file changed

+3
-1
lines changed
  • src/content/docs/rules/transform/request-header-modification

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ You can create a request header transform rule [in the dashboard](/rules/transfo
5454

5555
- 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 Transform Rules.
5656

57-
- You cannot modify the value of any header commonly used to identify the website visitor's IP address or initial protocol, such as `x-forwarded-for`, `true-client-ip`, `x-real-ip`, or `x-forwarded-proto`. Additionally, you cannot remove the `x-forwarded-for` and `x-forwarded-proto` headers.
57+
- You cannot modify the value of any header commonly used to identify the website visitor's IP address or initial protocol, such as `x-forwarded-for`, `true-client-ip`, `x-real-ip`, or `x-forwarded-proto`.
58+
59+
- While you can remove the `x-forwarded-for` header, it will be added back by Cloudflare's cache service, and this header will reach your origin server. If you remove the `x-forwarded-for` header and the request is handled by Cloudflare Workers — which [run before the cache](/workers/reference/how-the-cache-works/) — the `x-forwarded-for` request header will be absent.
5860

5961
- 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.
6062

0 commit comments

Comments
 (0)