Skip to content

Commit c3441c5

Browse files
authored
Prefix headers sent by the playground with cf-ew-raw- (#6528)
1 parent 19aa64f commit c3441c5

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/nice-pants-wash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"workers-playground": patch
3+
---
4+
5+
Prefix HTTP headers sent by the playground with `cf-ew-raw-`

packages/workers-playground/src/QuickEditor/HTTPTab/fetchWorker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ export function fetchWorker(
1111
return fetch(`${proxyUrl.origin}${init}`, {
1212
...input,
1313
headers: [
14-
...(input?.headers ?? []).filter(([name]) => name),
14+
...(input?.headers ?? [])
15+
.filter(([name]) => name)
16+
.map<[string, string]>(([n, v]) => [`cf-ew-raw-${n}`, v]),
1517
["X-CF-Token", token],
1618
["cf-raw-http", "true"],
1719
],

0 commit comments

Comments
 (0)