mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-26 04:03:03 +01:00
Disable test client by default
This commit is contained in:
parent
b9f171d940
commit
22fb62673a
@ -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, "public")));
|
||||||
app.use("/assets", express.static(path.join(ASSET_FOLDER_PATH, "cache")));
|
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?
|
// Test client is disabled, so don't need to run any more. Above should probably be moved somewhere?
|
||||||
if (!Config.get().client.useTestClient) return;
|
if (!Config.get().client.useTestClient) return;
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@ import { ClientReleaseConfiguration } from ".";
|
|||||||
|
|
||||||
export class ClientConfiguration {
|
export class ClientConfiguration {
|
||||||
releases: ClientReleaseConfiguration = new ClientReleaseConfiguration();
|
releases: ClientReleaseConfiguration = new ClientReleaseConfiguration();
|
||||||
useTestClient: boolean = true;
|
useTestClient: boolean = false;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user