1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-04-30 07:27:58 +02:00

preview:serviceworker: add json to file list

This commit is contained in:
Kushagra Gour 2019-02-28 17:20:13 +05:30
parent c14b6d2336
commit fd99b03384

View File

@ -32,9 +32,10 @@ function getContentType(url) {
return 'text/html; charset=UTF-8';
} else if (url.match(/\.css$/)) {
return 'text/css; charset=UTF-8';
}
if (url.match(/\.js$/)) {
} else if (url.match(/\.js$/)) {
return 'application/javascript; charset=UTF-8';
} else if (url.match(/\.json$/)) {
return 'application/json; charset=UTF-8';
}
return 'text/html; charset=UTF-8';
}