Skip to content

Commit fabb565

Browse files
committed
[service-utils] remove unneeded cf worker imports
1 parent 25b149d commit fabb565

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/service-utils/src/cf-worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type {
22
ExecutionContext,
33
KVNamespace,
4+
Request,
45
Response,
56
} from "@cloudflare/workers-types";
6-
import type { Request } from "@cloudflare/workers-types";
77
import type { CoreServiceConfig, TeamAndProjectResponse } from "../core/api.js";
88
import { authorize } from "../core/authorize/index.js";
99
import type {

packages/service-utils/src/cf-worker/usageV2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Headers, type Request, fetch } from "@cloudflare/workers-types";
1+
import type { Request } from "@cloudflare/workers-types";
22
import type { CoreAuthInput } from "src/core/types.js";
33
import type {
44
ClientUsageV2Event,
@@ -34,7 +34,7 @@ export async function sendUsageV2Events<T extends UsageV2Options>(
3434
// Forward headers from the origin request.
3535
// Determine endpoint and auth header based on provided credentials.
3636
let url: string;
37-
const headers = new Headers(authInput.req.headers);
37+
const headers = new Headers(Object.fromEntries(authInput.req.headers));
3838
headers.set("Content-Type", "application/json");
3939
if (serviceKey) {
4040
// If a service key is provided, call the non-public usage endpoint.

0 commit comments

Comments
 (0)