Adding allow insecure cert option

This commit is contained in:
Wayne
2025-09-01 11:51:53 +03:00
parent 373fa1451f
commit 21fe610cad
4 changed files with 10 additions and 2 deletions

View File

@@ -27,9 +27,8 @@ export class ImapConnector implements IEmailConnector {
port: this.credentials.port,
secure: this.credentials.secure,
tls: {
rejectUnauthorized: false,
rejectUnauthorized: this.credentials.allowInsecureCert,
requestCert: true,
},
auth: {
user: this.credentials.username,

View File

@@ -49,6 +49,7 @@
providerConfig: source?.credentials ?? {
type: source?.provider ?? 'generic_imap',
secure: true,
allowInsecureCert: false,
},
});
@@ -222,6 +223,12 @@
>
<Checkbox id="secure" bind:checked={formData.providerConfig.secure} />
</div>
<div class="grid grid-cols-4 items-center gap-4">
<Label for="secure" class="text-left"
>{$t('app.components.ingestion_source_form.allow_insecure_cert')}</Label
>
<Checkbox id="secure" bind:checked={formData.providerConfig.allowInsecureCert} />
</div>
{:else if formData.provider === 'pst_import'}
<div class="grid grid-cols-4 items-center gap-4">
<Label for="pst-file" class="text-left"

View File

@@ -183,6 +183,7 @@
"port": "Port",
"username": "Username",
"use_tls": "Use TLS",
"allow_insecure_cert": "Allow insecure cert",
"pst_file": "PST File",
"eml_file": "EML File",
"heads_up": "Heads up!",

View File

@@ -44,6 +44,7 @@ export interface GenericImapCredentials extends BaseIngestionCredentials {
host: string;
port: number;
secure: boolean;
allowInsecureCert: boolean;
username: string;
password?: string;
}