summary refs log tree commit diff
path: root/src/api/middlewares/TestClient.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-20 19:24:20 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-20 19:26:20 +0200
commit674fa8364ed36e09bb428d4d063646930b560828 (patch)
tree52b0df0198df530026c0530aa46ec6988a38ad55 /src/api/middlewares/TestClient.ts
parentDisable yarn PnP (diff)
downloadserver-674fa8364ed36e09bb428d4d063646930b560828.tar.xz
Improve first setup, make server load initial configuraiton
Diffstat (limited to 'src/api/middlewares/TestClient.ts')
-rw-r--r--src/api/middlewares/TestClient.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/api/middlewares/TestClient.ts b/src/api/middlewares/TestClient.ts

index 2c872068..2784c8ab 100644 --- a/src/api/middlewares/TestClient.ts +++ b/src/api/middlewares/TestClient.ts
@@ -94,11 +94,8 @@ export default function TestClient(app: Application) { } function applyEnv(html: string): string { - const CDN_ENDPOINT = (Config.get().cdn.endpointClient || Config.get()?.cdn.endpointPublic || process.env.CDN || "").replace( - /(https?)?(:\/\/?)/g, - "" - ); - const GATEWAY_ENDPOINT = Config.get().gateway.endpointClient || Config.get()?.gateway.endpointPublic || process.env.GATEWAY || ""; + const CDN_ENDPOINT = (Config.get()?.cdn.endpointPublic || process.env.CDN || "").replace(/(https?)?(:\/\/?)/g, ""); + const GATEWAY_ENDPOINT = Config.get()?.gateway.endpointPublic || process.env.GATEWAY || ""; if (CDN_ENDPOINT) { html = html.replace(/CDN_HOST: .+/, `CDN_HOST: \`${CDN_ENDPOINT}\`,`);