DEV: Fix ember CLI bootstrap logic (#15160)

When 1fa7a87f was rebased onto `main`, it didn't take into account the recent changes in c0781d7d. This commit updates the logic to work properly.
This commit is contained in:
David Taylor 2021-12-01 18:31:52 +00:00 committed by GitHub
parent df6e8b924e
commit abe30a17da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ async function handleRequest(proxy, baseURL, req, res) {
res.set("content-security-policy", newCSP);
}
const isHTML = response.headers["content-type"]?.startsWith("text/html");
const isHTML = response.headers.get("content-type")?.startsWith("text/html");
const responseText = await response.text();
const preload = isHTML ? extractPreloadJson(responseText) : null;