From cff8b272b1631661b8d5f5f4b59bd534ad8c86ca Mon Sep 17 00:00:00 2001 From: Pierre-Alain TORET Date: Tue, 17 Apr 2018 11:14:32 +0200 Subject: Support hostname binding in config * Add basic support for hostname binding Signed-off-by: Pierre-Alain TORET * Make production example a bit more secure Signed-off-by: Pierre-Alain TORET * Make example config files compatible with hostname binding modification Signed-off-by: Pierre-Alain TORET * Fix typo Signed-off-by: Pierre-Alain TORET * Bind on 127.0.0.1 by default Signed-off-by: Pierre-Alain TORET * Update Docker configuration with hostname binding Signed-off-by: Pierre-Alain TORET --- server/initializers/checker.ts | 2 +- server/initializers/constants.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts index 45f1d79c3..71f303963 100644 --- a/server/initializers/checker.ts +++ b/server/initializers/checker.ts @@ -18,7 +18,7 @@ function checkConfig () { // Check the config files function checkMissedConfig () { - const required = [ 'listen.port', + const required = [ 'listen.port', 'listen.hostname', 'webserver.https', 'webserver.hostname', 'webserver.port', 'trust_proxy', 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 2622b2c71..56d39529e 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -86,7 +86,8 @@ let SCHEDULER_INTERVAL = 60000 * 60 const CONFIG = { CUSTOM_FILE: getLocalConfigFilePath(), LISTEN: { - PORT: config.get('listen.port') + PORT: config.get('listen.port'), + HOSTNAME: config.get('listen.hostname') }, DATABASE: { DBNAME: 'peertube' + config.get('database.suffix'), -- cgit v1.2.3