Ignore credentials endpoint in Auth (#966)

This commit is contained in:
Ahsan Virani 2020-09-17 11:24:34 +02:00 committed by GitHub
parent b90f4fb3f6
commit 4056b6861c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,8 @@ class App {
async config(): Promise<void> {
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;