From 98a43a4fd8d3df71fc02b552d7018e8a516803ba Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 10 Apr 2020 08:54:27 +0200 Subject: [PATCH] Update configuration --- config.json | 8 ++++++++ src/helpers/ConfigHelper.ts | 20 +++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) 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 {