mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
prettier
This commit is contained in:
parent
fa1431840a
commit
2c415265ea
2 changed files with 5 additions and 4 deletions
|
@ -37,7 +37,10 @@ export function rewriteHeaders(rawHeaders: BareHeaders, origin?: URL) {
|
|||
|
||||
urlHeaders.forEach((header) => {
|
||||
if (headers[header])
|
||||
headers[header] = encodeUrl(headers[header]?.toString() as string, origin);
|
||||
headers[header] = encodeUrl(
|
||||
headers[header]?.toString() as string,
|
||||
origin
|
||||
);
|
||||
});
|
||||
|
||||
if (headers["link"]) {
|
||||
|
|
|
@ -73,9 +73,7 @@ async function handleResponse(
|
|||
switch (destination) {
|
||||
case "iframe":
|
||||
case "document":
|
||||
if (
|
||||
responseHeaders["content-type"]?.startsWith("text/html")
|
||||
) {
|
||||
if (responseHeaders["content-type"]?.startsWith("text/html")) {
|
||||
responseBody = rewriteHtml(await response.text(), url);
|
||||
} else {
|
||||
responseBody = response.body;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue