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({