From dd2f9785854521dd54c950f29cd648c2209491e0 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 9 Aug 2021 21:10:49 +0200 Subject: :bug: fix test client --- src/middlewares/TestClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/middlewares/TestClient.ts b/src/middlewares/TestClient.ts index 4ebdd010..4e3c9de3 100644 --- a/src/middlewares/TestClient.ts +++ b/src/middlewares/TestClient.ts @@ -55,8 +55,8 @@ export default function TestClient(app: Application) { res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24); res.set("content-type", "text/html"); var html = indexHTML; - const CDN_ENDPOINT = Config.get()?.cdn.endpoint || process.env.CDN; - const GATEWAY_ENDPOINT = (Config.get()?.gateway.endpoint || process.env.GATEWAY || "").replace(/(https?)?(:\/\/?)/g, ""); + const CDN_ENDPOINT = (Config.get()?.cdn.endpoint || process.env.CDN || "").replace(/(https?)?(:\/\/?)/g, ""); + const GATEWAY_ENDPOINT = Config.get()?.gateway.endpoint || process.env.GATEWAY || ""; if (CDN_ENDPOINT) html = html.replace(/CDN_HOST: .+/, `CDN_HOST: "${CDN_ENDPOINT}",`); if (GATEWAY_ENDPOINT) html = html.replace(/GATEWAY_ENDPOINT: .+/, `GATEWAY_ENDPOINT: "${GATEWAY_ENDPOINT}",`); -- cgit 1.5.1