1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-16 00:06:40 +01:00

Merge pull request #264 from Unleash/disable-legacy-routes

Added option to disable legacy routes. Closes #244
This commit is contained in:
Ivar Conradi Østhus 2017-09-09 16:35:12 +02:00 committed by GitHub
commit 435d95582e
4 changed files with 8 additions and 3 deletions

View File

@ -35,8 +35,9 @@ unleash.start({
Available unleash options includes:
- databaseUrl
- port
- **databaseUrl** - the postgress database url to connect to. Should include username/password.
- **port** - Which port should the unleash-server bind to?
- **enableLegacyRoutes** (boolean) - allows you to turn on/off support for legacy routes to support older clients.
## How do I configure the log output?

View File

@ -9,6 +9,7 @@ const DEFAULT_OPTIONS = {
port: process.env.HTTP_PORT || process.env.PORT || 4242,
baseUriPath: process.env.BASE_URI_PATH || '',
serverMetrics: true,
enableLegacyRoutes: true,
publicFolder,
enableRequestLogger: isDev(),
};

View File

@ -38,7 +38,9 @@ exports.router = function(config) {
// $root/features
// $root/client/register
// $root/client/metrics
router.use('/api/features', clientFeatures.router(config));
if (config.enableLegacyRoutes) {
router.use('/api/features', clientFeatures.router(config));
}
return router;
};

View File

@ -15,6 +15,7 @@ function getSetup() {
baseUriPath: base,
stores,
eventBus,
enableLegacyRoutes: true,
});
return {