Added TrustServerCertificate=true to mssql connections

This commit is contained in:
Alejandro Celaya 2022-12-10 19:40:33 +01:00
parent 9bed7ef156
commit 0bc9bd9281
2 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,9 @@ return (static function (): array {
'port' => EnvVars::DB_PORT->loadFromEnv($resolveDefaultPort()),
'unix_socket' => $isMysqlCompatible ? EnvVars::DB_UNIX_SOCKET->loadFromEnv() : null,
'charset' => $resolveCharset(),
'driverOptions' => $driver !== 'mssql' ? [] : [
'TrustServerCertificate' => 'true',
],
],
};

View File

@ -101,6 +101,9 @@ $buildDbConnection = static function (): array {
'user' => 'sa',
'password' => 'Passw0rd!',
'dbname' => 'shlink_test',
'driverOptions' => [
'TrustServerCertificate' => 'true',
],
],
default => [ // mysql and maria
'driver' => 'pdo_mysql',