/** * Respond to the request * @param {Request} request */ async function handleRequest(request) { let url = new URL(request.url); let param = url.param; let newUrl = new URL("REDIRECT URL"); newUrl.pathname=url.pathname; for (const [key, value] of url.searchParams) { newUrl.searchParams.set(key,value); } return fetch(newUrl,request); }