optionally generate traefik files, set cors in config, and set trust proxy in config

This commit is contained in:
Milo Schwartz 2025-01-15 23:26:31 -05:00
parent 492dcd5033
commit 3a4131d54a
13 changed files with 300 additions and 49 deletions

View file

@ -20,7 +20,9 @@ const externalPort = config.getRawConfig().server.external_port;
export function createApiServer() {
const apiServer = express();
apiServer.set("trust proxy", 1);
if (config.getRawConfig().server.trust_proxy) {
apiServer.set("trust proxy", 1);
}
const corsConfig = config.getRawConfig().server.cors;