From 4c0c09c8bc800a9f16e16c00804f0e9074cdf15d Mon Sep 17 00:00:00 2001 From: Umimaso Date: Sat, 19 Jun 2021 15:49:49 +0100 Subject: feat: add routing for unversioned api requests Create new route for /api which can handle routing of unversioned requests. Update regex for NO_AUTHORIZATION_ROUTES to support unversioned requests. --- src/Server.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Server.ts') diff --git a/src/Server.ts b/src/Server.ts index 5ae65918..452bc1fe 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -94,6 +94,7 @@ export class FosscordServer extends Server { this.app = prefix; this.routes = await this.registerRoutes(path.join(__dirname, "routes", "/")); + app.use("/api", prefix); // allow unversioned requests app.use("/api/v8", prefix); this.app = app; this.app.use(ErrorHandler); -- cgit 1.5.1