mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-09 16:06:21 +02:00
preview:serviceworker: add json to file list
This commit is contained in:
@ -32,9 +32,10 @@ function getContentType(url) {
|
|||||||
return 'text/html; charset=UTF-8';
|
return 'text/html; charset=UTF-8';
|
||||||
} else if (url.match(/\.css$/)) {
|
} else if (url.match(/\.css$/)) {
|
||||||
return 'text/css; charset=UTF-8';
|
return 'text/css; charset=UTF-8';
|
||||||
}
|
} else if (url.match(/\.js$/)) {
|
||||||
if (url.match(/\.js$/)) {
|
|
||||||
return 'application/javascript; charset=UTF-8';
|
return 'application/javascript; charset=UTF-8';
|
||||||
|
} else if (url.match(/\.json$/)) {
|
||||||
|
return 'application/json; charset=UTF-8';
|
||||||
}
|
}
|
||||||
return 'text/html; charset=UTF-8';
|
return 'text/html; charset=UTF-8';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user