From 2657776edf0720ea6a6524f47cf6911805590f2d Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 4 Mar 2025 21:25:01 +0800 Subject: [PATCH] undo change --- packages/service-utils/src/cf-worker/usageV2.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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.