diff --git a/app/src/app/api/trpc/[trpc]/route.ts b/app/src/app/api/trpc/[trpc]/route.ts index c776a188..d4ef451b 100644 --- a/app/src/app/api/trpc/[trpc]/route.ts +++ b/app/src/app/api/trpc/[trpc]/route.ts @@ -9,4 +9,4 @@ const handler = (req: Request) => createContext: () => ({}), }); -export { handler as GET, handler as POST }; +export { handler as GET, handler as OPTIONS, handler as POST }; diff --git a/app/src/trpc/Provider.tsx b/app/src/trpc/Provider.tsx index d4d3d5fb..91c8c47f 100644 --- a/app/src/trpc/Provider.tsx +++ b/app/src/trpc/Provider.tsx @@ -14,7 +14,7 @@ export const TRPCProvider = ({ children }: { children: React.ReactNode }) => { ); const url = process.env.NEXT_PUBLIC_VERCEL_URL - ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` + ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/trpc/` : "http://localhost:3000/api/trpc/"; const [trpcClient] = useState(() =>