From fb6af2cfa0e7d149dd745de4d7a46821b93a0135 Mon Sep 17 00:00:00 2001 From: Peter Theill Date: Thu, 11 Feb 2016 01:06:25 +0100 Subject: [PATCH] Hide /config behind PARSE_EXPERIMENTAL_CONFIG_ENABLED flag --- src/global_config.js | 2 +- src/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/global_config.js b/src/global_config.js index 9d032d7d..c7c9266a 100644 --- a/src/global_config.js +++ b/src/global_config.js @@ -41,6 +41,6 @@ function getGlobalConfig(req) { } router.route('GET', '/config', getGlobalConfig); -router.route('POST', '/config', updateGlobalConfig); +router.route('PUT', '/config', updateGlobalConfig); module.exports = router; diff --git a/src/index.js b/src/index.js index 25e13641..ade8527b 100644 --- a/src/index.js +++ b/src/index.js @@ -121,7 +121,9 @@ function ParseServer(args) { router.merge(require('./installations')); router.merge(require('./functions')); router.merge(require('./schemas')); - router.merge(require('./global_config')); + if (process.env.PARSE_EXPERIMENTAL_CONFIG_ENABLED) { + router.merge(require('./global_config')); + } batch.mountOnto(router);