From ace064218b316da48b13d68e5bd19289daa39801 Mon Sep 17 00:00:00 2001 From: Szymon Szafoni Date: Tue, 12 Dec 2023 09:45:28 +0100 Subject: [PATCH] change env variable --- apps/server/src/infra/mail/interfaces/mail-config.ts | 2 +- apps/server/src/infra/mail/mail.service.ts | 2 +- apps/server/src/modules/server/server.config.ts | 2 +- config/default.schema.json | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/server/src/infra/mail/interfaces/mail-config.ts b/apps/server/src/infra/mail/interfaces/mail-config.ts index d4baab878e7..28696edcae3 100644 --- a/apps/server/src/infra/mail/interfaces/mail-config.ts +++ b/apps/server/src/infra/mail/interfaces/mail-config.ts @@ -1,3 +1,3 @@ export interface MailConfig { - ADDITIONAL_BLACKLISTED_EMAIL_DOMAINS: string[]; + BLOCKLIST_OF_EMAIL_DOMAINS: string[]; } diff --git a/apps/server/src/infra/mail/mail.service.ts b/apps/server/src/infra/mail/mail.service.ts index ce8f68ceddb..efb72aa9293 100644 --- a/apps/server/src/infra/mail/mail.service.ts +++ b/apps/server/src/infra/mail/mail.service.ts @@ -18,7 +18,7 @@ export class MailService { @Inject('MAIL_SERVICE_OPTIONS') private readonly options: MailServiceOptions, private readonly configService: ConfigService ) { - this.domainBlacklist = this.configService.get('ADDITIONAL_BLACKLISTED_EMAIL_DOMAINS'); + this.domainBlacklist = this.configService.get('BLOCKLIST_OF_EMAIL_DOMAINS'); } public async send(data: Mail): Promise { diff --git a/apps/server/src/modules/server/server.config.ts b/apps/server/src/modules/server/server.config.ts index e5fb0e2188e..c3c0789d344 100644 --- a/apps/server/src/modules/server/server.config.ts +++ b/apps/server/src/modules/server/server.config.ts @@ -46,7 +46,7 @@ const config: ServerConfig = { ADMIN_API__ALLOWED_API_KEYS: (Configuration.get('ADMIN_API__ALLOWED_API_KEYS') as string) .split(',') .map((apiKey) => apiKey.trim()), - ADDITIONAL_BLACKLISTED_EMAIL_DOMAINS: (Configuration.get('ADDITIONAL_BLACKLISTED_EMAIL_DOMAINS') as string) + BLOCKLIST_OF_EMAIL_DOMAINS: (Configuration.get('BLOCKLIST_OF_EMAIL_DOMAINS') as string) .split(',') .map((domain) => domain.trim()), }; diff --git a/config/default.schema.json b/config/default.schema.json index bcf9fe7de4e..e8ee6e58349 100644 --- a/config/default.schema.json +++ b/config/default.schema.json @@ -180,6 +180,11 @@ "default": "", "description": "Add custom domain to the list of blocked domains (comma separated list)." }, + "BLOCKLIST_OF_EMAIL_DOMAINS":{ + "type": "string", + "default": "", + "description": "Add custom domain to the list of blocked domains (comma separated list)." + }, "FEATURE_TSP_AUTO_CONSENT_ENABLED": { "type": "boolean", "default": false,