Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Modify request property

Demonstrates how to intercept an incoming HTTP request and create a new Request object with modified properties such as headers or methods within a Cloudflare Worker.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Modify request property

Demonstrates how to intercept an incoming HTTP request and create a new Request object with modified properties such as headers or methods within a Cloudflare Worker.

When To Use

Use when you need to intercept an incoming HTTP request to alter its headers, body, or method before passing it to a downstream service or origin.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-modify-request-property-workflow-guide.mdA Cloudflare Workers example demonstrating how to create a new Request object with modified properties from an incoming request.Questions about a Cloudflare Workers example demonstrating how to create a new Request object with modified properties from an incomi...
examples/workers-examples-modify-request-property-cloudflare-workers-modify-reque.textA JavaScript example demonstrating how to modify the hostname and URL properties of a request object within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to modify the hostname and URL properties of a request object within a Cloudfl...
examples/workers-examples-modify-request-property-cloudflare-workers-modify-reque-2.textA JavaScript example demonstrating how to modify the hostname and URL properties of a request object within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to modify the hostname and URL properties of a request object within a Cloudfl...
examples/workers-examples-modify-request-property-cloudflare-workers-python-modif.textA Python implementation using Pyodide to demonstrate how to modify request properties within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A Python implementation using Pyodide to demonstrate how to modify request properties within a Cloudflare Worker.
examples/workers-examples-modify-request-property-cloudflare-workers-hono-modify-.textA Hono application example demonstrating how to clone a request and modify its hostname property within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A Hono application example demonstrating how to clone a request and modify its hostname property within a Cloudflare...

What This Skill Covers

  • Create a modified request with edited properties based off of an incoming request.
  • Main sections: Tags.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/examples/modify-request-property