mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Fix incorrect MIME type for .js files loaded through CordovaResourceAPI.
This fixes devtools complaining about .js files being served as "text/plain" when they have gone through remapUrl().
This commit is contained in:
parent
be2f7d7a8a
commit
7951eee8a3
@ -188,6 +188,9 @@ public class CordovaResourceApi {
|
||||
extension = extension.toLowerCase(Locale.getDefault());
|
||||
if (extension.equals("3ga")) {
|
||||
return "audio/3gpp";
|
||||
} else if (extension.equals("js")) {
|
||||
// Missing from the map :(.
|
||||
return "text/javascript";
|
||||
}
|
||||
return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user