fix(electron): add search to proxied url (#4852)

This commit is contained in:
Peng Xiao
2023-11-06 22:47:44 +08:00
committed by GitHub
parent cb6974f263
commit da9934fbdc

View File

@@ -46,7 +46,10 @@ async function handleFileRequest(request: Request) {
const urlObject = new URL(request.url);
if (isNetworkResource(urlObject.pathname)) {
// just pass through (proxy)
return net.fetch(CLOUD_BASE_URL + urlObject.pathname, clonedRequest);
return net.fetch(
CLOUD_BASE_URL + urlObject.pathname + urlObject.search,
clonedRequest
);
} else {
// this will be file types (in the web-static folder)
let filepath = '';