From b71567c754a86fa6a2de6f46673d83f7e85f1caf Mon Sep 17 00:00:00 2001 From: devlikepro Date: Thu, 25 Jul 2024 17:44:38 +0300 Subject: [PATCH] [core] exclude path from api-key fixes #451 --- src/config.service.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/config.service.ts b/src/config.service.ts index d32973d4..9982f334 100644 --- a/src/config.service.ts +++ b/src/config.service.ts @@ -2,9 +2,7 @@ import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { parseBool } from './helpers'; -import { WAHAEngine } from './structures/enums.dto'; import { WebhookConfig } from './structures/webhooks.config.dto'; -import { getEngineName } from './version'; @Injectable() export class WhatsappConfigService { @@ -120,6 +118,14 @@ export class WhatsappConfigService { return this.configService.get('WHATSAPP_API_KEY', ''); } + getExcludedPaths(): string[] { + const value = this.configService.get('WHATSAPP_API_KEY_EXCLUDE_PATH', ''); + if (!value) { + return []; + } + return value.split(','); + } + getHealthMediaFilesThreshold(): number { return this.configService.get( 'WHATSAPP_HEALTH_MEDIA_FILES_THRESHOLD_MB',