mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
web - add mock manifest to prevent error
This commit is contained in:
parent
ef6cb80dd4
commit
7185c6f34a
|
@ -62,6 +62,17 @@ const server = http.createServer((req, res) => {
|
||||||
// favicon
|
// favicon
|
||||||
return serveFile(req, res, path.join(APP_ROOT, 'resources', 'win32', 'code.ico'));
|
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)) {
|
if (/^\/static\//.test(pathname)) {
|
||||||
// static requests
|
// static requests
|
||||||
return handleStatic(req, res, parsedUrl);
|
return handleStatic(req, res, parsedUrl);
|
||||||
|
|
Loading…
Reference in a new issue