From abe30a17da063a5f72c9535f9968e417099d5341 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 1 Dec 2021 18:31:52 +0000 Subject: [PATCH] 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. --- app/assets/javascripts/discourse/lib/bootstrap-json/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js index 197f9975be7..1a31ad5f9f0 100644 --- a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js +++ b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js @@ -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;