diff --git a/src/pages/api/[...proxy].ts b/src/pages/api/[...proxy].ts index c831988..9574877 100644 --- a/src/pages/api/[...proxy].ts +++ b/src/pages/api/[...proxy].ts @@ -5,8 +5,7 @@ import type { APIRoute } from "astro"; const getProxyUrl = (request: Request) => { const proxyUrl = new URL(import.meta.env.PUBLIC_PB_URL); const requestUrl = new URL(request.url); - - return new URL(requestUrl.pathname, proxyUrl); + return new URL(requestUrl.pathname + requestUrl.search, proxyUrl); }; export const ALL: APIRoute = async ({ request }) => {