summary refs log tree commit diff
path: root/api/src/middlewares/TestClient.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-28 22:27:01 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-28 22:27:01 +0200
commit3e9952ea8026743c86d25152c8febbe55722a135 (patch)
treef928ba0428a0f284ffc4c2146f412249c9693b7e /api/src/middlewares/TestClient.ts
parentMerge branch 'master' of https://github.com/fosscord/fosscord-server (diff)
parent:bug: fix channel permission overwrites (diff)
downloadserver-3e9952ea8026743c86d25152c8febbe55722a135.tar.xz
Merge branch 'master' of https://github.com/fosscord/fosscord-server
Diffstat (limited to 'api/src/middlewares/TestClient.ts')
-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}\`,`);