diff --git a/src/server/proxy.ts b/src/server/proxy.ts index a05d7fb..b2dd7f0 100644 --- a/src/server/proxy.ts +++ b/src/server/proxy.ts @@ -5,6 +5,8 @@ export type { WsData } export let perfTiming = false +export const setPerfTiming = (on: boolean) => { perfTiming = on } + const pendingMessages = new Map, (string | ArrayBuffer | Uint8Array)[]>() const upstreams = new Map, WebSocket>() @@ -14,8 +16,6 @@ interface WsData { protocols: string[] } -export const setPerfTiming = (on: boolean) => { perfTiming = on } - export function extractSubdomain(host: string): string | null { // Strip port const hostname = host.replace(/:\d+$/, '') @@ -57,7 +57,7 @@ export async function proxySubdomain(subdomain: string, req: Request): Promise