diff --git a/config.json b/config.json index 276c819..b6a4144 100644 --- a/config.json +++ b/config.json @@ -7,5 +7,13 @@ "dbName": "comunic", "user": "pierre", "password": "pierre" + }, + + "proxy": null, + "force_clients_https": null, + + "rtc_relay": { + "ip": "127.0.0.1", + "token": "SecretToken" } } \ No newline at end of file diff --git a/src/helpers/ConfigHelper.ts b/src/helpers/ConfigHelper.ts index 41e54bd..0184523 100644 --- a/src/helpers/ConfigHelper.ts +++ b/src/helpers/ConfigHelper.ts @@ -15,13 +15,31 @@ export interface DatabaseConfiguration { dbPrefix : string } +export interface RTCRelayConfiguration { + ip ?: string, + token: string, +} + export interface Configuration { + + // Server listening port port: number, + + // Access to user data storageURL : string, storagePath : string, + + // Database connection configuration database : DatabaseConfiguration, + + // URL of trusted proxy (to get remote IP address) proxy ?: string, - force_clients_https ?: boolean + + // Set access-control-allow-origin to require HTTPS + force_clients_https ?: boolean, + + // RTC (for calls) proxy configuration + rtc_relay ?: RTCRelayConfiguration, } export class ConfigurationHelper {