From 4056b6861c71fc12452a1924e1ec79fbd1d9ff42 Mon Sep 17 00:00:00 2001 From: Ahsan Virani Date: Thu, 17 Sep 2020 11:24:34 +0200 Subject: [PATCH] :zap: Ignore credentials endpoint in Auth (#966) --- packages/cli/src/Server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index 82682345a3..55a3920d82 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -172,7 +172,8 @@ class App { async config(): Promise { this.versions = await GenericHelpers.getVersions(); - const authIgnoreRegex = new RegExp(`^\/(healthz|${this.endpointWebhook}|${this.endpointWebhookTest})\/?.*$`); + const ignoredEndpoints = _(['healthz', this.endpointWebhook, this.endpointWebhookTest, this.endpointPresetCredentials]).compact().join('|'); + const authIgnoreRegex = new RegExp(`^\/(${ignoredEndpoints})\/?.*$`); // Check for basic auth credentials if activated const basicAuthActive = config.get('security.basicAuth.active') as boolean;