summary refs log tree commit diff
path: root/api/src/middlewares
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-25 23:55:19 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-25 23:55:19 +0200
commit286b4a69fd1a4a232afaea69aa29724cd7c53746 (patch)
tree3699f48e6874af5919af66e2878c5513be815a95 /api/src/middlewares
parent:bug: message attachment url (diff)
downloadserver-286b4a69fd1a4a232afaea69aa29724cd7c53746.tar.xz
:sparkles: add private and public endpoint
Diffstat (limited to 'api/src/middlewares')
-rw-r--r--api/src/middlewares/TestClient.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/middlewares/TestClient.ts b/api/src/middlewares/TestClient.ts

index 79f8f442..7db35285 100644 --- a/api/src/middlewares/TestClient.ts +++ b/api/src/middlewares/TestClient.ts
@@ -9,11 +9,11 @@ export default function TestClient(app: Application) { const indexHTML = fs.readFileSync(path.join(__dirname, "..", "..", "client_test", "index.html"), { encoding: "utf8" }); var html = indexHTML; - const CDN_ENDPOINT = (Config.get().cdn.endpointClient || Config.get()?.cdn.endpoint || process.env.CDN || "").replace( + 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.endpoint || process.env.GATEWAY || ""; + const GATEWAY_ENDPOINT = Config.get().gateway.endpointClient || Config.get()?.gateway.endpointPublic || process.env.GATEWAY || ""; if (CDN_ENDPOINT) { html = html.replace(/CDN_HOST: .+/, `CDN_HOST: \`${CDN_ENDPOINT}\`,`);