mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
trust server certificate option #305
This commit is contained in:
parent
1a90729f66
commit
755781bca6
@ -168,6 +168,10 @@
|
||||
<FormCheckboxField label="Is read only" name="isReadOnly" disabled={isConnected} />
|
||||
{/if}
|
||||
|
||||
{#if driver?.showConnectionField('trustServerCertificate', $values)}
|
||||
<FormCheckboxField label="Trust server certificate" name="trustServerCertificate" disabled={isConnected} />
|
||||
{/if}
|
||||
|
||||
{#if driver?.showConnectionField('defaultDatabase', $values)}
|
||||
<FormTextField label="Default database" name="defaultDatabase" disabled={isConnected} />
|
||||
{/if}
|
||||
|
@ -22,7 +22,7 @@ function extractTediousColumns(columns, addDriverNativeColumn = false) {
|
||||
return res;
|
||||
}
|
||||
|
||||
async function tediousConnect({ server, port, user, password, database, ssl }) {
|
||||
async function tediousConnect({ server, port, user, password, database, ssl, trustServerCertificate }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const connectionOptions = {
|
||||
encrypt: !!ssl,
|
||||
@ -32,6 +32,7 @@ async function tediousConnect({ server, port, user, password, database, ssl }) {
|
||||
validateBulkLoadParameters: false,
|
||||
requestTimeout: 1000 * 3600,
|
||||
port: port ? parseInt(port) : undefined,
|
||||
trustServerCertificate: !!trustServerCertificate,
|
||||
};
|
||||
|
||||
if (database) {
|
||||
|
@ -126,7 +126,8 @@ const driver = {
|
||||
showConnectionField: (field, values) =>
|
||||
['authType', 'server', 'port', 'user', 'password', 'defaultDatabase', 'singleDatabase', 'isReadOnly'].includes(
|
||||
field
|
||||
),
|
||||
) ||
|
||||
(field == 'trustServerCertificate' && values.authType != 'sql' && values.authType != 'sspi'),
|
||||
getQuerySplitterOptions: () => mssqlSplitterOptions,
|
||||
|
||||
engine: 'mssql@dbgate-plugin-mssql',
|
||||
|
Loading…
Reference in New Issue
Block a user