1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-27 20:55:25 +00:00

Move manifest to the root

Fixes #1278.
This commit is contained in:
Asher 2020-01-16 11:36:17 -06:00
parent 1474a82c7d
commit 45f70e741f
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
4 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,7 @@
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'self' 'unsafe-inline'; script-src 'unsafe-inline'; manifest-src 'self'; img-src 'self';">
<title>Authenticate: code-server</title>
<link rel="icon" href="./static/out/vs/server/src/media/favicon.ico" type="image/x-icon" />
<link rel="manifest" href="./static/out/vs/server/src/media/manifest.json" crossorigin="use-credentials">
<link rel="manifest" href="./manifest.json" crossorigin="use-credentials">
<link rel="apple-touch-icon" href="./static/out/vs/server/src/media/code-server.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="./static/out/vs/server/src/media/login.css" rel="stylesheet">

View File

@ -20,7 +20,7 @@
<!-- Workbench Icon/Manifest/CSS -->
<link rel="icon" href="./static-{{COMMIT}}/out/vs/server/src/media/favicon.ico" type="image/x-icon" />
<link rel="manifest" href="./static-{{COMMIT}}/out/vs/server/src/media/manifest.json" crossorigin="use-credentials">
<link rel="manifest" href="./manifest.json" crossorigin="use-credentials">
<link data-name="vs/workbench/workbench.web.api" rel="stylesheet" href="./static-{{COMMIT}}/out/vs/workbench/workbench.web.api.css">
<link rel="apple-touch-icon" href="./static-{{COMMIT}}/out/vs/server/src/media/code-server.png" />
<meta name="apple-mobile-web-app-capable" content="yes">

View File

@ -20,7 +20,7 @@
<!-- Workbench Icon/Manifest/CSS -->
<link rel="icon" href="./static/out/vs/server/src/media/favicon.ico" type="image/x-icon" />
<link rel="manifest" href="./static/out/vs/server/src/media/manifest.json" crossorigin="use-credentials">
<link rel="manifest" href="./manifest.json" crossorigin="use-credentials">
</head>
<body aria-label="">

View File

@ -296,6 +296,12 @@ export abstract class Server {
switch (base) {
case "/":
switch (requestPath) {
case "/manifest.json":
const response = await this.getResource(this.serverRoot, "media", requestPath);
response.cache = true;
return response;
}
if (!this.authenticate(request)) {
return { redirect: "/login" };
}