From fb3e8b08f89f34dafcdb9a2e0f84aa62ed33ed9b Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Thu, 11 Jan 2024 11:09:05 +0100 Subject: [PATCH 1/2] Update JS media type per RFC9239 https://datatracker.ietf.org/doc/html/rfc9239 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 45201b6..65cf090 100755 --- a/index.js +++ b/index.js @@ -75,7 +75,7 @@ else { const overrideContent = fs.readFileSync(path.join(__dirname, "overrides", "example-js-of-interest.js"), "utf8"); interceptedRequest.respond({ status: 200, - contentType: "application/javascript; charset=utf-8", + contentType: "text/javascript; charset=utf-8", body: overrideContent }); return; From 7a0f0a740b13cdc3a33874bb3e95f473781dcdbf Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Thu, 11 Jan 2024 11:09:58 +0100 Subject: [PATCH 2/2] Update JS media type per RFC9239 https://datatracker.ietf.org/doc/html/rfc9239 --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index c5958ed..9cd0ef5 100644 --- a/README.MD +++ b/README.MD @@ -57,7 +57,7 @@ In `index.js` we have a code fragment that looks like this: const overrideContent = fs.readFileSync(path.join(__dirname, "overrides", "example-js-of-interest.js"), "utf8"); interceptedRequest.respond({ status: 200, - contentType: "application/javascript; charset=utf-8", + contentType: "text/javascript; charset=utf-8", body: overrideContent }); return;