diff --git a/packages/service-utils/src/cf-worker/usageV2.ts b/packages/service-utils/src/cf-worker/usageV2.ts index 36209ba37dc..4063cde50c3 100644 --- a/packages/service-utils/src/cf-worker/usageV2.ts +++ b/packages/service-utils/src/cf-worker/usageV2.ts @@ -1,5 +1,4 @@ -import type { Request } from "@cloudflare/workers-types"; -import type { CoreAuthInput } from "src/core/types.js"; +import type { CoreAuthInput } from "../core/types.js"; import type { ClientUsageV2Event, UsageV2Event, @@ -34,7 +33,7 @@ export async function sendUsageV2Events( // Forward headers from the origin request. // Determine endpoint and auth header based on provided credentials. let url: string; - const headers = new Headers(Object.fromEntries(authInput.req.headers)); + const headers = new Headers(authInput.req.headers); headers.set("Content-Type", "application/json"); if (serviceKey) { // If a service key is provided, call the non-public usage endpoint.