mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 20:23:59 +00:00
Use SSL automatically for Azure SQL
This commit is contained in:
@@ -69,7 +69,11 @@ async function tediousConnect(storedConnection) {
|
|||||||
const [host, instance] = (server || '').split('\\');
|
const [host, instance] = (server || '').split('\\');
|
||||||
const connectionOptions = {
|
const connectionOptions = {
|
||||||
instanceName: instance,
|
instanceName: instance,
|
||||||
encrypt: !!ssl || authType == 'msentra' || authType == 'azureManagedIdentity',
|
encrypt:
|
||||||
|
!!ssl ||
|
||||||
|
authType == 'msentra' ||
|
||||||
|
authType == 'azureManagedIdentity' ||
|
||||||
|
server?.endsWith('.database.windows.net'),
|
||||||
cryptoCredentialsDetails: ssl ? _.pick(ssl, ['ca', 'cert', 'key']) : undefined,
|
cryptoCredentialsDetails: ssl ? _.pick(ssl, ['ca', 'cert', 'key']) : undefined,
|
||||||
trustServerCertificate: ssl ? (!ssl.ca && !ssl.cert && !ssl.key ? true : ssl.rejectUnauthorized) : undefined,
|
trustServerCertificate: ssl ? (!ssl.ca && !ssl.cert && !ssl.key ? true : ssl.rejectUnauthorized) : undefined,
|
||||||
enableArithAbort: true,
|
enableArithAbort: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user