Skip to content

Conversation

@hochoy
Copy link
Contributor

@hochoy hochoy commented Sep 27, 2025

Summary

From this issue: #25478
Documentation of fields: https://developers.cloudflare.com/ruleset-engine/rules-language/fields/reference/http.request.cookies/

This pull request updates documentation examples to use the correct syntax for accessing cookie values in Cloudflare Workers. The changes clarify how to retrieve the first value of a cookie from the request object.

Documentation corrections:

  • Updated the example values for setting the Cloudflare-Workers-Version-Key header to use http.request.cookies["session_id"][0] and http.request.cookies["user_id"][0] instead of the incorrect http.cookie syntax in src/content/docs/workers/static-assets/routing/advanced/gradual-rollouts.mdx. [1] [2]

Screenshots (optional)

Before
Screenshot 2025-09-27 at 11 01 09 AM

After
Screenshot 2025-09-27 at 11 31 40 AM

Logs of CF worker
Screenshot 2025-09-27 at 11 48 32 AM

Documentation checklist

@WillTaylorDev WillTaylorDev merged commit 5cfffb3 into cloudflare:production Sep 29, 2025
5 checks passed
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes a docs contribution, big or small label Sep 29, 2025
@holopin-bot
Copy link

holopin-bot bot commented Sep 29, 2025

Congratulations @hochoy, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmg55f5v6001bl7048nad6plc

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

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

Labels

contribution [Holopin] Recognizes a docs contribution, big or small product:workers Related to Workers product September 2025 size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants