mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-07 08:51:46 +00:00
Merge branch 'master' of https://github.com/fosscord/fosscord-api
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import bodyParser, { OptionsJson } from "body-parser";
|
||||
import express, { NextFunction, Request, Response, Application } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import express, { Request, Response, Application } from "express";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import fetch, { Response as FetchResponse } from "node-fetch";
|
||||
@@ -58,8 +56,9 @@ export default function TestClient(app: Application) {
|
||||
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}",`);
|
||||
if (CDN_ENDPOINT && Config.get().cdn.endpointClient) html = html.replace(/CDN_HOST: .+/, `CDN_HOST: "${CDN_ENDPOINT}",`);
|
||||
if (GATEWAY_ENDPOINT && Config.get().gateway.endpointClient)
|
||||
html = html.replace(/GATEWAY_ENDPOINT: .+/, `GATEWAY_ENDPOINT: "${GATEWAY_ENDPOINT}",`);
|
||||
|
||||
res.send(html);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user