mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-10-31 01:24:43 +00:00 
			
		
		
		
	Add proxy support
This commit is contained in:
		| @@ -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 => { | ||||
| 		 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user