fix: use hostname for suspense query url (#2187)

This commit is contained in:
Meier Lukas
2025-01-30 22:14:14 +01:00
committed by GitHub
parent bd0b7c9518
commit 96fd5cc35e
5 changed files with 22 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
import { appRouter, createTRPCContext } from "@homarr/api";
import { trpcPath } from "@homarr/api/shared";
import { auth } from "@homarr/auth/next";
import { logger } from "@homarr/log";
@@ -25,7 +26,7 @@ export function OPTIONS() {
const handler = auth(async (req) => {
const response = await fetchRequestHandler({
endpoint: "/api/trpc",
endpoint: trpcPath,
router: appRouter,
req,
createContext: () => createTRPCContext({ session: req.auth, headers: req.headers }),