diff options
-rw-r--r-- | src/api/middlewares/TestClient.ts | 6 | ||||
-rw-r--r-- | src/util/config/types/ClientConfiguration.ts | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/api/middlewares/TestClient.ts b/src/api/middlewares/TestClient.ts index 74845f04..a932caf6 100644 --- a/src/api/middlewares/TestClient.ts +++ b/src/api/middlewares/TestClient.ts @@ -11,6 +11,12 @@ export default function TestClient(app: Application) { app.use("/assets", express.static(path.join(ASSET_FOLDER_PATH, "public"))); app.use("/assets", express.static(path.join(ASSET_FOLDER_PATH, "cache"))); + app.get("*", (req, res, next) => { + if (Config.get().client.useTestClient) return next(); + + return res.redirect("/api/ping") + }) + // Test client is disabled, so don't need to run any more. Above should probably be moved somewhere? if (!Config.get().client.useTestClient) return; diff --git a/src/util/config/types/ClientConfiguration.ts b/src/util/config/types/ClientConfiguration.ts index 69b5e154..0d3c8490 100644 --- a/src/util/config/types/ClientConfiguration.ts +++ b/src/util/config/types/ClientConfiguration.ts @@ -2,5 +2,5 @@ import { ClientReleaseConfiguration } from "."; export class ClientConfiguration { releases: ClientReleaseConfiguration = new ClientReleaseConfiguration(); - useTestClient: boolean = true; + useTestClient: boolean = false; } \ No newline at end of file |