Skip to content

Commit ab38ea4

Browse files
committed
fix(request): use unique global cache key
1 parent 06b4801 commit ab38ea4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/adapters/_node/request.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ export type NodeRequestContext = {
1616
export const NodeRequest: {
1717
new (nodeCtx: NodeRequestContext): ServerRequest;
1818
} = /* @__PURE__ */ (() => {
19-
const NativeRequest = ((globalThis as any)._Request ??=
20-
globalThis.Request) as typeof globalThis.Request;
19+
const NativeRequest = ((globalThis as any)[
20+
Symbol.for("srvx.nativeRequest")
21+
] ??= globalThis.Request) as typeof globalThis.Request;
2122

2223
// Credits to hono/node adapter for global patching idea (https://github.com/honojs/node-server/blob/main/src/request.ts)
2324
const PatchedRequest = class Request extends NativeRequest {

0 commit comments

Comments
 (0)