From 06a7bb323c1010eb1e5b948d08bb0f0176e400f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Thu, 15 Apr 2021 22:16:14 +0200 Subject: [PATCH] fix: fully remove enableLegacyRoutes option --- docs/deploy/securing-unleash.md | 2 -- src/lib/routes/index.ts | 6 ------ 2 files changed, 8 deletions(-) diff --git a/docs/deploy/securing-unleash.md b/docs/deploy/securing-unleash.md index d6cb995103..daf1800ec8 100644 --- a/docs/deploy/securing-unleash.md +++ b/docs/deploy/securing-unleash.md @@ -91,5 +91,3 @@ unleash ``` [client-auth-unleash.js](https://github.com/Unleash/unleash/blob/master/examples/client-auth-unleash.js) - -PS! Remember to disable legacy routes by setting the `enableLegacyRoutes` option to false. This will require all your clients to be on v3.x. diff --git a/src/lib/routes/index.ts b/src/lib/routes/index.ts index ce0c7fbaa7..96fd16d4e3 100644 --- a/src/lib/routes/index.ts +++ b/src/lib/routes/index.ts @@ -23,12 +23,6 @@ class IndexRouter extends Controller { this.get(api.uri, this.index); this.use(api.links.admin.uri, new AdminApi(config, services).router); this.use(api.links.client.uri, new ClientApi(config, services).router); - - // legacy support (remove in 4.x) - if (config.enableLegacyRoutes) { - const featureController = new FeatureController(services, config); - this.use('/api/features', featureController.router); - } } index(req, res) {