fix: websocket prototype

This commit is contained in:
Percs 2024-11-26 17:03:18 -06:00
parent 51f1a773a4
commit 58fed66f78
5 changed files with 221 additions and 222 deletions

View file

@ -53,17 +53,19 @@ scramjet.addEventListener("request", (e) => {
e.response = new Response(playgroundData.js, {
headers,
});
e.response.rawHeaders = headers;
e.response.rawResponse = {
body: e.response.body,
headers: headers,
status: e.response.status,
statusText: e.response.statusText,
};
e.response.finalURL = e.url.toString();
} else {
return;
e.response = new Response("empty response", {
headers,
});
}
e.response.rawHeaders = headers;
e.response.rawResponse = {
body: e.response.body,
headers: headers,
status: e.response.status,
statusText: e.response.statusText,
};
e.response.finalURL = e.url.toString();
} else {
return;
}