Archived
1
0

Create helper for determining if route is the root

This commit is contained in:
Asher
2020-04-01 11:28:09 -05:00
parent 74a0bacdcf
commit 411c61fb02
7 changed files with 15 additions and 14 deletions

View File

@ -128,8 +128,7 @@ export class VscodeHttpProvider extends HttpProvider {
switch (route.base) {
case "/":
// Only serve this at the root.
if (route.requestPath && route.requestPath !== "/index.html") {
if (!this.isRoot(route)) {
throw new HttpError("Not found", HttpCode.NotFound)
} else if (!this.authenticated(request)) {
return { redirect: "/login", query: { to: this.options.base } }