From ae1c71f4c5f5d897b15173b5f7fa8c1bd51a5597 Mon Sep 17 00:00:00 2001 From: Moritz Ruth Date: Mon, 10 Feb 2025 17:52:34 +0100 Subject: [PATCH] commit 08 --- src/trpc.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/trpc.ts b/src/trpc.ts index 0638719..0e3b0fd 100644 --- a/src/trpc.ts +++ b/src/trpc.ts @@ -7,6 +7,10 @@ wsUrl.protocol = wsUrl.protocol.replace("http", "ws") wsUrl.pathname = "/ws" wsUrl.hash = "" +if (import.meta.env.PROD) { + wsUrl.hostname = "server." + wsUrl.hostname +} + export const trpcClient = createTRPCProxyClient({ links: [ wsLink({