1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 18:32:29 +01:00

Disable test client by default

This commit is contained in:
Madeline 2022-12-21 19:52:08 +11:00
parent b9f171d940
commit 22fb62673a
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
2 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -2,5 +2,5 @@ import { ClientReleaseConfiguration } from ".";
export class ClientConfiguration {
releases: ClientReleaseConfiguration = new ClientReleaseConfiguration();
useTestClient: boolean = true;
useTestClient: boolean = false;
}