mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
feat(email): configurable reply-to address (#3140)
This commit is contained in:
1 parent
98fa41dcf0
commit
811341bc2f
16 files changed
+138
-1
No files matched your search
@@ -163,6 +163,7 @@ function defaultConfig(): MasterConfig {
|
||||
provider: 'none',
|
||||
from_email: '',
|
||||
from_name: 'Fluxer',
|
||||
reply_to_email: '',
|
||||
app_base_url: '',
|
||||
},
|
||||
voice: {
|
||||
@@ -292,6 +293,12 @@ function requireString(value: string | undefined, envName: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
function validateReplyToEmail(value: string): void {
|
||||
if (value !== '' && !/^[^\s@<>,;"]+@[^\s@<>,;"]+$/.test(value)) {
|
||||
throw new Error('FLUXER_EMAIL_REPLY_TO_EMAIL must be a single email address such as [email protected]');
|
||||
}
|
||||
}
|
||||
|
||||
function validateUploadRelaySecret(value: string): void {
|
||||
const trimmed = value.trim();
|
||||
if (trimmed.length === 0) {
|
||||
@@ -566,6 +573,7 @@ function normalizeConfig(config: MasterConfig): MasterConfig {
|
||||
validateStorageChangeFeedConfig(config);
|
||||
validateCachePurgeConfig(config);
|
||||
validateStoreBillingConfig(config);
|
||||
validateReplyToEmail(config.integrations.email.reply_to_email);
|
||||
normalizeAppOriginAliases(config);
|
||||
assertIntegerInRange(config.services.api.max_inflight_requests, 'FLUXER_API_MAX_INFLIGHT_REQUESTS', 1, 100_000);
|
||||
assertIntegerInRange(config.services.api.headers_timeout_ms, 'FLUXER_API_HEADERS_TIMEOUT_MS', 1_000, 3_600_000);
|
||||
|
||||
Reference in new issue
Block a user