From b6000f88e22f6bb82a58479992a8860adc4f75a3 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Thu, 17 Mar 2022 21:32:57 -0700 Subject: [PATCH] Change .js MIME type to text/javascript. --- .../WebView/WebView/src/FileExtensionContentTypeProvider.cs | 3 ++- .../ResponseCompression/src/ResponseCompressionDefaults.cs | 1 + .../StaticFiles/src/FileExtensionContentTypeProvider.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Components/WebView/WebView/src/FileExtensionContentTypeProvider.cs b/src/Components/WebView/WebView/src/FileExtensionContentTypeProvider.cs index 005a77c131ee..5b751626753d 100644 --- a/src/Components/WebView/WebView/src/FileExtensionContentTypeProvider.cs +++ b/src/Components/WebView/WebView/src/FileExtensionContentTypeProvider.cs @@ -152,7 +152,7 @@ public FileExtensionContentTypeProvider() { ".jpe", "image/jpeg" }, { ".jpeg", "image/jpeg" }, { ".jpg", "image/jpeg" }, - { ".js", "application/javascript" }, + { ".js", "text/javascript" }, { ".json", "application/json" }, { ".jsx", "text/jscript" }, { ".latex", "application/x-latex" }, @@ -181,6 +181,7 @@ public FileExtensionContentTypeProvider() { ".mid", "audio/mid" }, { ".midi", "audio/mid" }, { ".mix", "application/octet-stream" }, + { ".mjs", "text/javascript" }, { ".mmf", "application/x-smaf" }, { ".mno", "text/xml" }, { ".mny", "application/x-msmoney" }, diff --git a/src/Middleware/ResponseCompression/src/ResponseCompressionDefaults.cs b/src/Middleware/ResponseCompression/src/ResponseCompressionDefaults.cs index 8824d81d291c..4a81fe651116 100644 --- a/src/Middleware/ResponseCompression/src/ResponseCompressionDefaults.cs +++ b/src/Middleware/ResponseCompression/src/ResponseCompressionDefaults.cs @@ -19,6 +19,7 @@ public class ResponseCompressionDefaults // Static files "text/css", "application/javascript", + "text/javascript", // MVC "text/html", "application/xml", diff --git a/src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs b/src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs index 147b2946c00d..6af230121250 100644 --- a/src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs +++ b/src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs @@ -146,7 +146,7 @@ public FileExtensionContentTypeProvider() { ".jpe", "image/jpeg" }, { ".jpeg", "image/jpeg" }, { ".jpg", "image/jpeg" }, - { ".js", "application/javascript" }, + { ".js", "text/javascript" }, { ".json", "application/json" }, { ".jsx", "text/jscript" }, { ".latex", "application/x-latex" },