Skip to content

Commit 99f27df

Browse files
authored
fix(workers-playground): sends raw request method through the X-CF-HTTP-Method header (#7639)
1 parent 902e3af commit 99f27df

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/odd-news-invent.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+
fix: sends raw request method through the X-CF-HTTP-Method header

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ export function fetchWorker(
1010

1111
return fetch(`${proxyUrl.origin}${init}`, {
1212
...input,
13+
method: "POST",
1314
headers: [
1415
...(input?.headers ?? [])
1516
.filter(([name]) => name)
1617
.map<[string, string]>(([n, v]) => [`cf-ew-raw-${n}`, v]),
1718
["X-CF-Token", token],
1819
["cf-raw-http", "true"],
20+
["X-CF-HTTP-Method", input.method ?? "GET"],
1921
],
2022
});
2123
}

0 commit comments

Comments
 (0)