Proxy forwards Query parameters too
This commit is contained in:
parent
2e54690ee4
commit
b3f92210fa
@ -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 }) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user