feat: add nginx proxy (#1073)

* feat: add nginx proxy

* fix: adjust path for websocket client to connect
This commit is contained in:
Meier Lukas
2024-09-16 18:10:58 +02:00
committed by GitHub
parent 9fb6e67ed3
commit cd4619845b
4 changed files with 47 additions and 2 deletions

View File

@@ -20,7 +20,10 @@ import type { AppRouter } from "@homarr/api";
import { clientApi } from "@homarr/api/client";
const wsClient = createWSClient({
url: typeof window === "undefined" ? "ws://localhost:3001" : `ws://${window.location.hostname}:3001`,
url:
typeof window === "undefined"
? "ws://localhost:3001/websockets"
: `ws://${window.location.hostname}:${window.location.port}/websockets`,
});
export function TRPCReactProvider(props: PropsWithChildren) {