summary refs log tree commit diff
path: root/src/api/middlewares/TestClient.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/middlewares/TestClient.ts')
-rw-r--r--src/api/middlewares/TestClient.ts6
1 files changed, 6 insertions, 0 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;