⬆️ update demo test client

This commit is contained in:
Flam3rboy 2021-08-05 13:44:50 +02:00
parent e9d387f3b5
commit cce776e2e9
2 changed files with 12 additions and 8 deletions

View File

@ -12,6 +12,8 @@
window.__BILLING_STANDALONE__ = /^\/billing/.test(location.pathname); window.__BILLING_STANDALONE__ = /^\/billing/.test(location.pathname);
window.GLOBAL_ENV = { window.GLOBAL_ENV = {
API_ENDPOINT: "/api", API_ENDPOINT: "/api",
API_VERSION: 9,
GATEWAY_ENDPOINT: "ws://localhost:3002",
WEBAPP_ENDPOINT: "", WEBAPP_ENDPOINT: "",
CDN_HOST: "//localhost:3003", CDN_HOST: "//localhost:3003",
ASSET_ENDPOINT: "", ASSET_ENDPOINT: "",
@ -40,9 +42,9 @@
`{"trace":false,"canary":false,"logGatewayEvents":true,"logOverlayEvents":false,"logAnalyticsEvents":false,"sourceMapsEnabled":false,"axeEnabled":false}` `{"trace":false,"canary":false,"logGatewayEvents":true,"logOverlayEvents":false,"logAnalyticsEvents":false,"sourceMapsEnabled":false,"axeEnabled":false}`
); );
</script> </script>
<script src="/assets/61f7be162421cd42f199.js"></script> <script src="/assets/f4cfdce920759d48b997.js"></script>
<script src="/assets/da78ae85f903dce85263.js"></script> <script src="/assets/fee63b3d875ea42099e2.js"></script>
<script src="/assets/3bd2d6e80bb6aed96970.js"></script> <script src="/assets/f291c7bb28bfcc2c10ab.js"></script>
<script src="/assets/381b7100fc5abbb037f9.js"></script> <script src="/assets/2d959037561522bd3b2a.js"></script>
</body> </body>
</html> </html>

View File

@ -160,10 +160,12 @@ export class FosscordServer extends Server {
res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24); res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24);
res.set("content-type", "text/html"); res.set("content-type", "text/html");
res.send( res.send(
indexHTML.replace( indexHTML
.replace(
/CDN_HOST: ".+"/, /CDN_HOST: ".+"/,
`CDN_HOST: "${(Config.get().cdn.endpoint || "http://localhost:3003").replace(/https?:/, "")}"` `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(); return super.start();