diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-20 19:24:20 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-20 19:26:20 +0200 |
commit | 674fa8364ed36e09bb428d4d063646930b560828 (patch) | |
tree | 52b0df0198df530026c0530aa46ec6988a38ad55 /src/api | |
parent | Disable yarn PnP (diff) | |
download | server-674fa8364ed36e09bb428d4d063646930b560828.tar.xz |
Improve first setup, make server load initial configuraiton
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/middlewares/TestClient.ts | 7 |
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}\`,`); |