mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 17:00:54 +01:00
fix: use hostname for suspense query url (#2187)
This commit is contained in:
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user