Fix favicon
This commit is contained in:
parent
45d348b03d
commit
b0e6c1cc4e
|
@ -218,7 +218,9 @@ export abstract class Server {
|
||||||
switch (base) {
|
switch (base) {
|
||||||
case "/":
|
case "/":
|
||||||
this.ensureGet(request);
|
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" };
|
return { redirect: "https://" + request.headers.host + "/login" };
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -231,9 +233,6 @@ export abstract class Server {
|
||||||
}
|
}
|
||||||
this.ensureGet(request);
|
this.ensureGet(request);
|
||||||
return this.getResource(path.join(this.rootPath, "/out/vs/server/src/login", requestPath));
|
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:
|
default:
|
||||||
this.ensureGet(request);
|
this.ensureGet(request);
|
||||||
if (!this.authenticate(request)) {
|
if (!this.authenticate(request)) {
|
||||||
|
|
Loading…
Reference in New Issue