Skip to content

Cloud: rewrite rule request headers and cookies - #813

Open
timkelty wants to merge 13 commits into
mainfrom
cloud/rewrite-request-options
Open

timkelty wants to merge 13 commits into
mainfrom
cloud/rewrite-request-options

Conversation

@timkelty

@timkelty timkelty commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

This PR documents the rewrite-rule request options added in Cloud Gateway 1.68.0. It extends the existing Rewrites section in cloud/redirects.md.

Changes

  • A new "Request Headers and Cookies" section covers:
    • the default request headers forwarded to destinations other than the CDN or the environment’s own domains
    • request.cookies and request.headers, including {request.cookies.*}, {request.cf.*}, bracket syntax for dotted keys, and brace escapes
    • blocked header names
    • no caching and no redirect-following for rules that use either option
  • The Google tag gateway path is the example.
  • The Custom Headers section now says top-level headers are response headers.
  • The request.headers description says header names aren't case-sensitive. Before cloud-gateway 1.68.1 (craftcms/cloud-gateway#300), only lowercase names resolved, so the old {request.headers.Content-Type} example didn't work.

Related issues

  • craftcms/cloud-gateway#295
  • craftcms/cloud-api#2002
  • craftcms/cloud-api#2010
  • craftcms/cloud-gateway#300

@timkelty
timkelty requested a review from a team as a code owner December 4, 2026 16:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T16:38:15.099691Z 57ea4ab PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@netlify

netlify Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for craft-docs ready!

Name Link
🔨 Latest commit 9863961
🔍 Latest deploy log https://app.netlify.com/projects/craft-docs/deploys/6b12f78367841fa16b2f7c7d
😎 Deploy Preview https://deploy-preview-813--craft-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@timkelty timkelty changed the title Cloud: rewrite rule request headers and cookies Cloud: rewrite request options, rename redirects page to Routing Rules Dec 4, 2026
@timkelty
timkelty force-pushed the cloud/rewrite-request-options branch from 8a8dde2 to 57ea4ab Compare December 4, 2026 16:53
@timkelty timkelty changed the title Cloud: rewrite request options, rename redirects page to Routing Rules Cloud: rewrite rule request headers and cookies Dec 4, 2026
@timkelty
timkelty added this pull request to stack #815 December 4, 2026 17:22

@AugustMiller AugustMiller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll admit I understand very little of this material, but it looks like we're playing some additional feature catch-up, beyond 1.68 features.

Approving, so #814 is not blocked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants