diff --git a/client_test/index.html b/client_test/index.html index a8887981..da970e4f 100644 --- a/client_test/index.html +++ b/client_test/index.html @@ -12,6 +12,8 @@ window.__BILLING_STANDALONE__ = /^\/billing/.test(location.pathname); window.GLOBAL_ENV = { API_ENDPOINT: "/api", + API_VERSION: 9, + GATEWAY_ENDPOINT: "ws://localhost:3002", WEBAPP_ENDPOINT: "", CDN_HOST: "//localhost:3003", ASSET_ENDPOINT: "", @@ -40,9 +42,9 @@ `{"trace":false,"canary":false,"logGatewayEvents":true,"logOverlayEvents":false,"logAnalyticsEvents":false,"sourceMapsEnabled":false,"axeEnabled":false}` ); - - - - + + + + diff --git a/src/Server.ts b/src/Server.ts index 52e217f8..aa66b5b6 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -160,10 +160,12 @@ export class FosscordServer extends Server { res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24); res.set("content-type", "text/html"); res.send( - indexHTML.replace( - /CDN_HOST: ".+"/, - `CDN_HOST: "${(Config.get().cdn.endpoint || "http://localhost:3003").replace(/https?:/, "")}"` - ) + indexHTML + .replace( + /CDN_HOST: ".+"/, + `CDN_HOST: "${(Config.get().cdn.endpoint || "http://localhost:3003").replace(/https?:/, "")}"` + ) + .replace(/GATEWAY_ENDPOINT: ".+"/, `GATEWAY_ENDPOINT: "${Config.get().gateway.endpoint || "ws://localhost:3002"}"`) ); }); return super.start();