ChatGPT SearchSep 23, 2026
Data as of Oct 12, 2026A topic in Content Delivery Networks and Edge Platforms.
Reviewed by Dimitry Apollonsky
Mentioned in · Jul 5 – Oct 12, 2026
We need a programmable edge platform that allows us to run custom JavaScript at the edge to modify headers on the fly. Which vendors support this level of customization?
I'm looking for an edge computing platform where we can execute custom JavaScript to manipulate HTTP headers in real-time. Can you recommend some options?
We are looking for an edge computing platform where we can execute custom JavaScript to dynamically alter HTTP headers. Can you recommend providers that offer this capability?
ChatGPT SearchSep 23, 2026
Yes. Several edge/CDN platforms let you execute custom code in the request path and modify the URL and/or headers before forwarding upstream.
| Platform | Custom edge code | Rewrite URL | Modify request headers | Notes |
|---|---|---|---|---|
| Cloudflare Workers | JavaScript/TypeScript, WASM | ✅ | ✅ | Very flexible; Worker runs before cache/origin and can construct a modified Request. |
| Fastly Compute | Rust, JavaScript, Go | ✅ | ✅ | Designed specifically for programmable edge/CDN request processing. |
| Akamai EdgeWorkers | JavaScript | ✅ | ✅ | Runs JavaScript at Akamai edge locations; particularly suited to CDN/proxy transformations. |
| Vercel Routing Middleware | JavaScript/TypeScript | ✅ | ✅ | Runs before request processing; supports custom logic, rewrites and request-header modification. |
| AWS Lambda@Edge | Node.js/Python | ✅ | ✅ | Runs code at CloudFront edge locations, including viewer/origin request events. |
| AWS CloudFront Functions | JavaScript | ✅ | ✅ | Lighter-weight alternative to Lambda@Edge, intended for high-volume request/response transformations. |
| Netlify Edge Functions | TypeScript/JavaScript | ✅ | ✅ | Deno-based edge functions with access to the incoming Request/Response. |
| Fly.io | Machines/apps rather than CDN middleware | ✅ | ✅ | Can act as a globally distributed programmable reverse proxy, but the model is different from Workers/Fastly. |
client
↓
edge function
├─ inspect URL
├─ inspect headers
├─ rewrite URL
├─ add/remove/modify headers
↓
originI'd narrow the field to Cloudflare Workers, Fastly Compute, Akamai EdgeWorkers, AWS CloudFront Functions/Lambda@Edge, and Vercel Routing Middleware.
Cloudflare is particularly direct for this use case: its documentation explicitly describes a Worker modifying the incoming request—for example, rewriting the URL or adding headers—before calling fetch() to continue through the cache/origin. Cloudflare Docs Cloudflare also has declarative Request Header Transform Rules if you don't actually need arbitrary code.
Vercel's Routing Middleware similarly runs before the request is processed and supports rewrites and request modification; Vercel even documents adding/updating/deleting request headers in middleware.
If you tell me whether you're looking for (a) a CDN in front of an arbitrary origin, (b) an API gateway, or (c) hosting an application, I can compare the relevant platforms on latency, runtime limits, pricing, cold starts, header manipulation, and origin rewrites.
Google AI ModeSep 23, 2026
Several major serverless edge computing platforms allow developers to execute custom code close to users in order to inspect, rewrite, and manipulate HTTP requests, responses, and headers on the fly .
Fetch API objects, making it trivial to modify request/response headers, rewrite URLs, or redirect traffic with near-zero cold starts.Request and Response ) to easily rewrite paths, inject security headers, or personalize content before it reaches the user or origin.If you'd like, let me know:
I can provide a code snippet showing how to implement a custom header rewrite or URL redirect for your setup.