diff --git a/src/server/context.ts b/src/server/context.ts index a9d4e755..1a4aa266 100644 --- a/src/server/context.ts +++ b/src/server/context.ts @@ -105,7 +105,7 @@ export class ServerContext { let error: ErrorPage = DEFAULT_ERROR; for (const [self, module] of Object.entries(manifest.routes)) { const url = new URL(self, baseUrl).href; - if (!url.startsWith(baseUrl)) { + if (!url.startsWith(baseUrl + "routes")) { throw new TypeError("Page is not a child of the basepath."); } const path = url.substring(baseUrl.length).substring("routes".length);