aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorPierre-Alain TORET <pierre-alain.toret@protonmail.com>2018-04-17 11:14:32 +0200
committerChocobozzz <me@florianbigard.com>2018-04-17 11:14:32 +0200
commitcff8b272b1631661b8d5f5f4b59bd534ad8c86ca (patch)
tree465cb9a49289e3695d60917f02974afd16799b27 /server
parentc0c7416a233d1bf1ed197b8f383aca74bc27c3f0 (diff)
downloadPeerTube-cff8b272b1631661b8d5f5f4b59bd534ad8c86ca.tar.gz
PeerTube-cff8b272b1631661b8d5f5f4b59bd534ad8c86ca.tar.zst
PeerTube-cff8b272b1631661b8d5f5f4b59bd534ad8c86ca.zip
Support hostname binding in config
* Add basic support for hostname binding Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com> * Make production example a bit more secure Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com> * Make example config files compatible with hostname binding modification Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com> * Fix typo Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com> * Bind on 127.0.0.1 by default Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com> * Update Docker configuration with hostname binding Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
Diffstat (limited to 'server')
-rw-r--r--server/initializers/checker.ts2
-rw-r--r--server/initializers/constants.ts3
2 files changed, 3 insertions, 2 deletions
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 () {
18 18
19// Check the config files 19// Check the config files
20function checkMissedConfig () { 20function checkMissedConfig () {
21 const required = [ 'listen.port', 21 const required = [ 'listen.port', 'listen.hostname',
22 'webserver.https', 'webserver.hostname', 'webserver.port', 22 'webserver.https', 'webserver.hostname', 'webserver.port',
23 'trust_proxy', 23 'trust_proxy',
24 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 24 '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
86const CONFIG = { 86const CONFIG = {
87 CUSTOM_FILE: getLocalConfigFilePath(), 87 CUSTOM_FILE: getLocalConfigFilePath(),
88 LISTEN: { 88 LISTEN: {
89 PORT: config.get<number>('listen.port') 89 PORT: config.get<number>('listen.port'),
90 HOSTNAME: config.get<string>('listen.hostname')
90 }, 91 },
91 DATABASE: { 92 DATABASE: {
92 DBNAME: 'peertube' + config.get<string>('database.suffix'), 93 DBNAME: 'peertube' + config.get<string>('database.suffix'),