mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-24 14:29:23 +00:00
Add proxy support
This commit is contained in:
parent
69a3d7ed5b
commit
1a6cbf6dcb
@ -20,6 +20,7 @@ export interface Configuration {
|
||||
storageURL : string,
|
||||
storagePath : string,
|
||||
database : DatabaseConfiguration,
|
||||
proxy ?: string
|
||||
}
|
||||
|
||||
export class ConfigurationHelper {
|
||||
|
@ -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 => {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user