diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-09 21:10:49 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-09 21:10:49 +0200 |
commit | dd2f9785854521dd54c950f29cd648c2209491e0 (patch) | |
tree | 797b3943619e9cf0f4bba72e3b0a406caf1816bc | |
parent | npm i @fosscord/server-util@1.3.45 (diff) | |
download | server-dd2f9785854521dd54c950f29cd648c2209491e0.tar.xz |
:bug: fix test client
-rw-r--r-- | src/middlewares/TestClient.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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}",`); |