We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2657776 commit 915415bCopy full SHA for 915415b
packages/service-utils/src/cf-worker/usageV2.ts
@@ -1,3 +1,4 @@
1
+import type { Request } from "@cloudflare/workers-types";
2
import type { CoreAuthInput } from "../core/types.js";
3
import type {
4
ClientUsageV2Event,
@@ -33,7 +34,7 @@ export async function sendUsageV2Events<T extends UsageV2Options>(
33
34
// Forward headers from the origin request.
35
// Determine endpoint and auth header based on provided credentials.
36
let url: string;
- const headers = new Headers(authInput.req.headers);
37
+ const headers = new Headers(Object.fromEntries(authInput.req.headers));
38
headers.set("Content-Type", "application/json");
39
if (serviceKey) {
40
// If a service key is provided, call the non-public usage endpoint.
0 commit comments