cloudflare · Cloudflare Workers Docs
Workers Accessing the Cloudflare Object
Demonstrates how to access and manipulate custom Cloudflare properties to control feature application on incoming requests using JavaScript, TypeScript, or Python.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Accessing the Cloudflare Object
Demonstrates how to access and manipulate custom Cloudflare properties to control feature application on incoming requests using JavaScript, TypeScript, or Python.
When To Use
Use when you need to access custom Cloudflare properties or control how specific Cloudflare features are applied to individual incoming requests within a Worker script.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-accessing-the-cloudflare-object-workflow-guide.md | Markdown documentation providing code examples for accessing Cloudflare object properties within a Cloudflare Worker. | Questions about markdown documentation providing code examples for accessing Cloudflare object properties within a Cloudflare Worker. |
examples/workers-examples-accessing-the-cloudflare-object-cloudflare-workers-acce.text | A JavaScript example demonstrating how to access and return the cf object properties within a Cloudflare Worker fetch handler. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to access and return the cf object properties within a Cloudflare Worker fetch... |
examples/workers-examples-accessing-the-cloudflare-object-cloudflare-workers-cf-o.text | A Cloudflare Worker script that retrieves and returns the contents of the request cf object as a JSON response. | Exact payloads, commands, or snippets shown in A Cloudflare Worker script that retrieves and returns the contents of the request cf object as a JSON response. |
examples/workers-examples-accessing-the-cloudflare-object-cloudflare-workers-hono.text | A Hono framework example demonstrating how to access the request cf object within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A Hono framework example demonstrating how to access the request cf object within a Cloudflare Worker. |
examples/workers-examples-accessing-the-cloudflare-object-cloudflare-workers-pyth.text | A Python example demonstrating how to access and return the request.cf object within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A Python example demonstrating how to access and return the request.cf object within a Cloudflare Worker. |
What This Skill Covers
- Access custom Cloudflare properties and control how Cloudflare features are applied to every request.
- Main sections:
Tags.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/examples/accessing-the-cloudflare-object
