[Gateway] Document HTTP header manipulation: add, set, delete with dynamic variables#32090
Open
grstnhbr wants to merge 3 commits into
Open
[Gateway] Document HTTP header manipulation: add, set, delete with dynamic variables#32090grstnhbr wants to merge 3 commits into
grstnhbr wants to merge 3 commits into
Conversation
…ons with dynamic variables
Contributor
Review
Fix in your agentFix the following review findings in PR #32090 (https://github.com/cloudflare/cloudflare-docs/pull/32090).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, fix all legitimate findings. For any you decide to skip,
post a comment on this PR with the finding ID and your reasoning.
---
## Code Review
### Warnings (1)
#### CR-c325cbebafca · Inaccurate dashboard instructions for delete operation
- **File:** `src/content/docs/cloudflare-one/traffic-policies/http-policies/tenant-control.mdx` line 75
- **Issue:** Step 6 tells users to enter a header name and value for every header operation and to use the value field for dynamic variables. However, Remove/delete operations only remove a header by name and do not have a value field, so this instruction does not apply to all operation types introduced in step 5.
- **Fix:** Qualify step 6 to note that Remove/delete operations only require a header name, or split the instructions so delete operations are described separately from Add/Overwrite.
---
## Style Guide Review
### Suggestions (1)
#### SG-c9c878cb7e1f · Use `select` instead of `click`
- **File:** `src/content/docs/cloudflare-one/traffic-policies/http-policies/tenant-control.mdx` line 75
- **Issue:** Step instructs the user to `click the `</>` button`.
- **Fix:** Change `click the `</>` button` to `select the `</>` button`.
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (1)
ConventionsNo convention issues found. Style Guide ReviewSuggestions (1)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
alyssamw
reviewed
Jul 15, 2026
| 3. Build an expression to match the traffic you want to modify. | ||
| 4. In **Action**, select _Allow_. | ||
| 5. Under **Modify request headers**, select **Add** or **Overwrite** to add or set headers. To delete a header, select **Remove**. | ||
| 6. For each header operation, enter the header name and value. To use a dynamic variable, enter the `@{...}` syntax in the value field, or click the `</>` button to see the list of available values. |
alyssamw
reviewed
Jul 15, 2026
| | `@{device.id}` | Cloudflare One Client device UUID. | | ||
| | `@{device.posture}` | Device posture check results (serialized as a JSON string).| | ||
|
|
||
| Dynamic variables require an active identity session. If Gateway cannot resolve a variable (for example, the user is not authenticated), the variable is replaced with an empty string and a warning is logged. |
Contributor
There was a problem hiding this comment.
the variable replaced with a warning string ie cf-unresolved or cf-invalid and a warning is inserted into the http log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the new HTTP header manipulation feature for Gateway Allow policies. This expands the existing tenant-control page into a broader "Custom headers" page covering three operations (add, set, delete) and dynamic variable interpolation.
Changes
tenant-control.mdx(renamed title to "Custom headers", filename kept for URL stability):@{identity.email},@{device.id},@{source.ip}, and 7 others)rule_settingsfield referenceindex.mdx:Context
add_headers,set_headers,delete_headersinrule_settings${}to@{}for Terraform compatibility (GIN-2133)