提交 7185c6f3 编写于 作者: B Benjamin Pasero

web - add mock manifest to prevent error

上级 ef6cb80d
......@@ -62,6 +62,17 @@ const server = http.createServer((req, res) => {
// favicon
return serveFile(req, res, path.join(APP_ROOT, 'resources', 'win32', 'code.ico'));
}
if (pathname === '/manifest.json') {
// manifest
res.writeHead(200, { 'Content-Type': 'application/json' });
return res.end(JSON.stringify({
"name": "Code Web - OSS",
"short_name": "Code Web - OSS",
"start_url": "/",
"lang": "en-US",
"display": "standalone"
}));
}
if (/^\/static\//.test(pathname)) {
// static requests
return handleStatic(req, res, parsedUrl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册