From b0e6c1cc4eeef4ec50ea91f06883257efc6ea28e Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 17 Jul 2019 12:37:09 -0500 Subject: [PATCH] Fix favicon --- src/server.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/server.ts b/src/server.ts index 7653fbb3..15fd4422 100644 --- a/src/server.ts +++ b/src/server.ts @@ -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)) {