diff --git a/src/helpers/ConfigHelper.ts b/src/helpers/ConfigHelper.ts index 9f1d069..986c7b8 100644 --- a/src/helpers/ConfigHelper.ts +++ b/src/helpers/ConfigHelper.ts @@ -20,6 +20,7 @@ export interface Configuration { storageURL : string, storagePath : string, database : DatabaseConfiguration, + proxy ?: string } export class ConfigurationHelper { diff --git a/src/main.ts b/src/main.ts index 2dd6240..cef3d0e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -30,6 +30,12 @@ async function init() { app.use(fileUpload()); + // Check if the server is running behing a proxy + if(conf().proxy) { + console.info("Running behind proxy: " + conf().proxy); + app.set("trust proxy", conf().proxy); + } + // Process the list of routes Routes.forEach(route => {