Fix favicon

This commit is contained in:
Asher 2019-07-17 12:37:09 -05:00
parent 45d348b03d
commit b0e6c1cc4e
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -218,7 +218,9 @@ export abstract class Server {
switch (base) {
case "/":
this.ensureGet(request);
if (!this.authenticate(request)) {
if (requestPath === "/favicon.ico") {
return this.getResource(path.join(this.rootPath, "/out/vs/server/src/favicon", requestPath));
} else if (!this.authenticate(request)) {
return { redirect: "https://" + request.headers.host + "/login" };
}
break;
@ -231,9 +233,6 @@ export abstract class Server {
}
this.ensureGet(request);
return this.getResource(path.join(this.rootPath, "/out/vs/server/src/login", requestPath));
case "/favicon.ico":
this.ensureGet(request);
return this.getResource(path.join(this.rootPath, "/out/vs/server/src/favicon", base));
default:
this.ensureGet(request);
if (!this.authenticate(request)) {