walnut.js/lib/unbrick-appcache.js

11 lines
308 B
JavaScript
Raw Permalink Normal View History

2015-11-14 04:25:12 +00:00
module.exports.unbrick = function (req, res) {
// hack for bricked app-cache
if (/\.(appcache|manifest)\b/.test(req.url)) {
res.setHeader('Content-Type', 'text/cache-manifest');
res.end('CACHE MANIFEST\n\n# v0__DELETE__CACHE__MANIFEST__\n\nNETWORK:\n*');
return true;
}
return false;
};